checkpoint

This commit is contained in:
Joe Ardent 2023-02-05 15:41:23 -08:00
parent 52e685ceed
commit 18615e9ac8
2 changed files with 23 additions and 14 deletions

View File

@ -2,10 +2,13 @@ use bevy::prelude::{
shape::Capsule as Tire, AlphaMode, BuildChildren, Color, Commands, Entity, Mesh, PbrBundle,
Quat, SpatialBundle, StandardMaterial, Transform, Vec3,
};
use bevy_rapier3d::prelude::{
Ccd, CoefficientCombineRule, Collider, ColliderMassProperties, CollisionGroups, Damping,
ExternalForce, Friction, LockedAxes, MultibodyJoint, PrismaticJointBuilder, Restitution,
RevoluteJointBuilder, RigidBody, Sleeping, TransformInterpolation,
use bevy_rapier3d::{
prelude::{
Ccd, CoefficientCombineRule, Collider, ColliderMassProperties, CollisionGroups, Damping,
ExternalForce, Friction, LockedAxes, MultibodyJoint, PrismaticJointBuilder, Restitution,
RevoluteJointBuilder, RigidBody, Sleeping, TransformInterpolation,
},
render::ColliderDebugColor,
};
use super::{CyberSteering, CyberWheel, Meshterial, WheelConfig, BIKE_WHEEL_COLLISION_GROUP};
@ -127,7 +130,12 @@ pub fn spawn_tires(
CyberWheel,
ExternalForce::default(),
not_sleeping,
//axel,
ColliderDebugColor(Color::Rgba {
red: 0.1,
green: 0.1,
blue: 0.1,
alpha: 0.5,
}), //axel,
);
let _wentity = commands
@ -142,15 +150,15 @@ pub fn spawn_tires(
..Default::default()
})
.insert(wheel_bundle)
.with_children(|wheel| {
wheel
.spawn(SpatialBundle::default())
.insert(pbr_bundle.clone())
.insert(TransformInterpolation {
start: None,
end: None,
});
})
// .with_children(|wheel| {
// wheel
// .spawn(SpatialBundle::default())
// .insert(pbr_bundle.clone())
// .insert(TransformInterpolation {
// start: None,
// end: None,
// });
// })
.set_parent(sentity)
.id();
}

View File

@ -82,6 +82,7 @@ impl Plugin for CyberGlamorPlugin {
};
let style = DebugRenderStyle {
multibody_joint_anchor_color: Color::GREEN.as_rgba_f32(),
multibody_joint_separation_color: Color::GOLD.as_rgba_f32(),
..Default::default()
};
let mode = DebugRenderMode::CONTACTS