correct children casters

This commit is contained in:
Joe Ardent 2025-02-17 21:15:13 -08:00
parent 6dd7277584
commit b8a54626a7
2 changed files with 10 additions and 1 deletions

View file

@ -78,7 +78,13 @@ fn spawn_bike(
MeshMaterial3d(materials.add(color)),
);
builder.spawn(pbr_bundle);
spawn_wheels(builder, meshes, materials, xform, builder.parent_entity());
spawn_wheels(
builder,
meshes,
materials,
Transform::default(),
builder.parent_entity(),
);
});
//spawn_wheels(commands, meshes, materials, xform, bike);

View file

@ -181,6 +181,9 @@ impl Plugin for CyberPhysicsPlugin {
.register_type::<CyberLean>()
.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin::default()))
.insert_resource(SubstepCount(12))
.add_systems(Startup, |mut gravity: ResMut<Gravity>| {
gravity.0 *= 0.01;
})
.add_systems(Update, (apply_lean, calculate_lean));
}
}