Closed
Description
Currently bevy_rapier3d
uses Transform
component to read entity absolute transform. But this component is a transform relative to a parent in Bevy world. On the other hand GlobalTransform
is an absolute transform for entity. Because of this if there is an entity with non-identity transform and as a children of it is another entity with a collider, collisions will not be detected in the real object location. For example when running following code ball collider will be placed at 0,0,0 instead of 0,10,0:
commands.spawn_bundle((
Transform::from_xyz(0.0, 10.0, 0.0),
GlobalTransform::default(),
))
.with_children(|parent| {
parent
.spawn_bundle((
Transform::default(),
GlobalTransform::default(),
))
.insert(RigidBody::Fixed)
.insert(Collider::ball(1.0));
});
Metadata
Metadata
Assignees
Labels
No labels