add rake to front wheel
This commit is contained in:
parent
c41fc78b00
commit
507b82a771
1 changed files with 7 additions and 1 deletions
|
@ -78,7 +78,13 @@ pub fn spawn_tires(
|
||||||
let mass_props = ColliderMassProperties::Density(0.1);
|
let mass_props = ColliderMassProperties::Density(0.1);
|
||||||
let damping = conf.damping;
|
let damping = conf.damping;
|
||||||
|
|
||||||
let prismatic_builder = PrismaticJointBuilder::new(Vec3::Y)
|
let prismatic_axis = if steering.is_some() {
|
||||||
|
Vec3::new(0.0, 1.0, 0.57).normalize() // about 30 degrees of rake
|
||||||
|
} else {
|
||||||
|
Vec3::Y
|
||||||
|
};
|
||||||
|
|
||||||
|
let prismatic_builder = PrismaticJointBuilder::new(prismatic_axis)
|
||||||
.local_anchor1(offset)
|
.local_anchor1(offset)
|
||||||
.limits(limits)
|
.limits(limits)
|
||||||
.motor_position(limits[0], stiffness, damping);
|
.motor_position(limits[0], stiffness, damping);
|
||||||
|
|
Loading…
Reference in a new issue