Hello, i teleport an entity with childs, the child have a rigidbody and collision component too, but while the parent entity is teleported with attributes, the child doesn’t. I know there is an instruction to align the rigidbody to the model, but don’t remember (and can’t find) it. Thanks a lot.
There’s a non public function to sync the physics body to the entity position.
However, if you have a physics object with child physics object, in the physics simulation, they are considered to be separate rather than a parent child relationship.
Is there a reason for the objects to be children of another physics object?
Yes, some building has items close by, so if it’s a child it’s re-positioned alongside with the main entity. If it’s not a child i have to do that by code and it’s a pain.
Ok solved for now all my issues, the only one still present is the with childs with rigidbodies, is there any way to solve that or i have to separate the entities? Thanks.
BTW: if i do a this.entity.rigidbody.teleport() with not values, it move the entity to 0,0,0 or just reallign the rigidbody at the current entity position?
Seems i have solved the problem, if i set the rigidbody to kinematic and the model to static it seems to work properly for childs, will check again to confirm that.