correct children casters
This commit is contained in:
parent
6dd7277584
commit
b8a54626a7
2 changed files with 10 additions and 1 deletions
|
@ -78,7 +78,13 @@ fn spawn_bike(
|
||||||
MeshMaterial3d(materials.add(color)),
|
MeshMaterial3d(materials.add(color)),
|
||||||
);
|
);
|
||||||
builder.spawn(pbr_bundle);
|
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);
|
//spawn_wheels(commands, meshes, materials, xform, bike);
|
||||||
|
|
|
@ -181,6 +181,9 @@ impl Plugin for CyberPhysicsPlugin {
|
||||||
.register_type::<CyberLean>()
|
.register_type::<CyberLean>()
|
||||||
.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin::default()))
|
.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin::default()))
|
||||||
.insert_resource(SubstepCount(12))
|
.insert_resource(SubstepCount(12))
|
||||||
|
.add_systems(Startup, |mut gravity: ResMut<Gravity>| {
|
||||||
|
gravity.0 *= 0.01;
|
||||||
|
})
|
||||||
.add_systems(Update, (apply_lean, calculate_lean));
|
.add_systems(Update, (apply_lean, calculate_lean));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue