Replies: 2 comments 6 replies
-
Hi, For each of theses needs, I would rather improve heron to add a dedicated component to the API (but only when actually needed). So for your current need we could feature a I understand it means that heron's is more limited, as one has to wait until heron adds support for each feature. But it is somewhat the point of this plugin. Users that want full power of rapier out-of-the box (at the cost of higher complexity) can use |
Beta Was this translation helpful? Give feedback.
-
You can use code like this for adjusting a rigid body after creation: use heron::rapier_plugin::rapier2d::dynamics::{RigidBodyHandle, RigidBodySet};
struct EnableCcd;
fn adjust_rigid_body(
mut commands: Commands,
mut bodies: ResMut<RigidBodySet>,
handles: Query<(Entity, &RigidBodyHandle), With<EnableCcd>>,
) {
for (entity, handle) in handles.iter() {
if let Some(body) = bodies.get_mut(*handle) {
body.enable_ccd(true);
commands.entity(entity).remove::<EnableCcd>();
println!("{:?}: enable ccd", entity);
}
}
} But there is a pitfall (correct me if I'm wrong): according to functions |
Beta Was this translation helpful? Give feedback.
-
I'd like a capability to tweak
RigidBodyBuilder
's parameters at rigid body spawn time in an arbitrary manner.My concrete interest for now is turning on
ccd_enabled
- but something else might be required later (I can imaginesleeping
and related stuff).Beta Was this translation helpful? Give feedback.
All reactions