-
I was going about finally updating my projects that use bevy_rapier and noticed that it's moved away from using bundles. That makes it a little bit difficult (for me at least) to know which components are actually necessary now. Should I assume that in general if I had been defaulting it in the old bundles that I don't need to add it as a separate component now? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
That’s right, there is no more bundles. For rigid-bodies, the only required component is the All the other components are optional and will have their default values if they are not set. You may want to insert the optional components if:
|
Beta Was this translation helpful? Give feedback.
-
Did the RigidBodyPositionSync component get replaced with something else? I'm having a hard time sorting out where that one went. |
Beta Was this translation helpful? Give feedback.
That’s right, there is no more bundles. For rigid-bodies, the only required component is the
bevy_rapier::prelude::RigidBody
component. For colliders, the only required components is thebevy_rapier::prelude::Collider
component.All the other components are optional and will have their default values if they are not set. You may want to insert the optional components if:
Transform
component to set the body’s position).Velocity
components lets you read the value of the modified velocity after the physics updates.