diff --git a/src/bike/wheels.rs b/src/bike/wheels.rs index 487cd75..50a031e 100644 --- a/src/bike/wheels.rs +++ b/src/bike/wheels.rs @@ -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(); } diff --git a/src/glamor.rs b/src/glamor.rs index 64c09b7..7518486 100644 --- a/src/glamor.rs +++ b/src/glamor.rs @@ -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