checkpoint
This commit is contained in:
parent
52e685ceed
commit
18615e9ac8
2 changed files with 23 additions and 14 deletions
|
@ -2,10 +2,13 @@ use bevy::prelude::{
|
||||||
shape::Capsule as Tire, AlphaMode, BuildChildren, Color, Commands, Entity, Mesh, PbrBundle,
|
shape::Capsule as Tire, AlphaMode, BuildChildren, Color, Commands, Entity, Mesh, PbrBundle,
|
||||||
Quat, SpatialBundle, StandardMaterial, Transform, Vec3,
|
Quat, SpatialBundle, StandardMaterial, Transform, Vec3,
|
||||||
};
|
};
|
||||||
use bevy_rapier3d::prelude::{
|
use bevy_rapier3d::{
|
||||||
|
prelude::{
|
||||||
Ccd, CoefficientCombineRule, Collider, ColliderMassProperties, CollisionGroups, Damping,
|
Ccd, CoefficientCombineRule, Collider, ColliderMassProperties, CollisionGroups, Damping,
|
||||||
ExternalForce, Friction, LockedAxes, MultibodyJoint, PrismaticJointBuilder, Restitution,
|
ExternalForce, Friction, LockedAxes, MultibodyJoint, PrismaticJointBuilder, Restitution,
|
||||||
RevoluteJointBuilder, RigidBody, Sleeping, TransformInterpolation,
|
RevoluteJointBuilder, RigidBody, Sleeping, TransformInterpolation,
|
||||||
|
},
|
||||||
|
render::ColliderDebugColor,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{CyberSteering, CyberWheel, Meshterial, WheelConfig, BIKE_WHEEL_COLLISION_GROUP};
|
use super::{CyberSteering, CyberWheel, Meshterial, WheelConfig, BIKE_WHEEL_COLLISION_GROUP};
|
||||||
|
@ -127,7 +130,12 @@ pub fn spawn_tires(
|
||||||
CyberWheel,
|
CyberWheel,
|
||||||
ExternalForce::default(),
|
ExternalForce::default(),
|
||||||
not_sleeping,
|
not_sleeping,
|
||||||
//axel,
|
ColliderDebugColor(Color::Rgba {
|
||||||
|
red: 0.1,
|
||||||
|
green: 0.1,
|
||||||
|
blue: 0.1,
|
||||||
|
alpha: 0.5,
|
||||||
|
}), //axel,
|
||||||
);
|
);
|
||||||
|
|
||||||
let _wentity = commands
|
let _wentity = commands
|
||||||
|
@ -142,15 +150,15 @@ pub fn spawn_tires(
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.insert(wheel_bundle)
|
.insert(wheel_bundle)
|
||||||
.with_children(|wheel| {
|
// .with_children(|wheel| {
|
||||||
wheel
|
// wheel
|
||||||
.spawn(SpatialBundle::default())
|
// .spawn(SpatialBundle::default())
|
||||||
.insert(pbr_bundle.clone())
|
// .insert(pbr_bundle.clone())
|
||||||
.insert(TransformInterpolation {
|
// .insert(TransformInterpolation {
|
||||||
start: None,
|
// start: None,
|
||||||
end: None,
|
// end: None,
|
||||||
});
|
// });
|
||||||
})
|
// })
|
||||||
.set_parent(sentity)
|
.set_parent(sentity)
|
||||||
.id();
|
.id();
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,7 @@ impl Plugin for CyberGlamorPlugin {
|
||||||
};
|
};
|
||||||
let style = DebugRenderStyle {
|
let style = DebugRenderStyle {
|
||||||
multibody_joint_anchor_color: Color::GREEN.as_rgba_f32(),
|
multibody_joint_anchor_color: Color::GREEN.as_rgba_f32(),
|
||||||
|
multibody_joint_separation_color: Color::GOLD.as_rgba_f32(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let mode = DebugRenderMode::CONTACTS
|
let mode = DebugRenderMode::CONTACTS
|
||||||
|
|
Loading…
Reference in a new issue