Search Unity

Unparent physics body and shapes in hybrid player character

Discussion in 'Physics for ECS' started by shotoutgames, Feb 11, 2020.

  1. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    290
    I am using Hybrid based player character.
    Basically a regular third person character game object but trying to use dots physics collider and shapes instead of rigidbody and standard colliders.
    This requires using convert and inject game object instead of convert and destroy.
    When separate from the player I can track the player trigger entity so it follows and the trigger game object in the scene converts to entity.
    However when I add the the trigger game object as a nested trigger. I get a message that Target will be unparented during the conversion process in order to take part in physics simulation.
    I took this to mean that it will unparent but still create the entity I need to follow.
    I can get around this easy enough for one player but can't seem to come up with a method to easily do this with several players. I end up creating unparented trigger objects for each player instead of just making one a child of each player.
    Any advice is greatly appreciated