You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// settingParent -> insert(TransformBundle::default())Child -> insert(TransformBundle::default(),Collider::cuboid(1,1,1),**RigidBody::Fixed**)// **problemParent = Transform[scale(1,1,1),position(0,0,0)]Child = Transform[scale(1,1,1),position(-100,100,0)]// if parent's scale set to (1.1, 1.5, 0.0)// without rigidbodyParent = Transform[scale(1.1,1.5,1.0),position(0,0,0)],GlobalTransform[scale(1.1,1.5,1.0),position(0,0,0)]Child = Transform[scale(1,1,1),position(-100,100,0)],GlobalTransform[scale(1.1,1.5,1.0),position(-110,150,0)]// with rigidbodyParent = Transform[scale(1.1,1.5,1.0),position(0,0,0)],GlobalTransform[scale(1.1,1.5,1.0),position(0,0,0)]Child = Transform[scale(1,1,1),position(-110,150,0)],GlobalTransform[scale(1.1,1.5,1.0),position(-121,225,0)]
Without rigidbody, child's position is perfect which moves by parent's scale.
But with rigidbody, child's position is wierd. I read that rigidbody is calculated based on globaltransform.
So I think when after parent's scale changed, Rapier calculate the child's local position based on child's global scale before bevy's Transform system.
I think that is why child's local position is not (-100, 100, 0) when with rigidbody. It seems rigidbody's Transform calculation need to be fixed.
The text was updated successfully, but these errors were encountered:
Without rigidbody, child's position is perfect which moves by parent's scale.
But with rigidbody, child's position is wierd. I read that rigidbody is calculated based on globaltransform.
So I think when after parent's scale changed, Rapier calculate the child's local position based on child's global scale before bevy's Transform system.
I think that is why child's local position is not (-100, 100, 0) when with rigidbody. It seems rigidbody's Transform calculation need to be fixed.
The text was updated successfully, but these errors were encountered: