be more brake-aggressive

This commit is contained in:
Joe Ardent 2023-02-17 18:54:42 -08:00
parent 6fd4f7c2e0
commit 9e63186aa5

View file

@ -2,16 +2,10 @@ use std::f32::consts::PI;
#[cfg(feature = "inspector")]
use std::time::Instant;
use bevy::{
ecs::entity,
prelude::{Commands, Entity, Quat, Query, Res, ResMut, Time, Transform, Vec3, With, Without},
};
use bevy_rapier3d::{
prelude::{
CollisionGroups, ExternalForce, GenericJoint, Group, MultibodyJoint, QueryFilter,
RapierConfiguration, RapierContext, ReadMassProperties, RevoluteJoint, Velocity,
},
rapier::prelude::JointAxis,
use bevy::prelude::{Commands, Entity, Query, Res, ResMut, Time, Transform, Vec3, With, Without};
use bevy_rapier3d::prelude::{
CollisionGroups, ExternalForce, Group, MultibodyJoint, QueryFilter, RapierConfiguration,
RapierContext, ReadMassProperties, Velocity,
};
#[cfg(feature = "inspector")]
@ -92,7 +86,6 @@ pub(super) fn input_forces(
(With<CyberBikeBody>, Without<CyberSteering>),
>,
mut steering_query: Query<&mut MultibodyJoint, With<CyberSteering>>,
#[cfg(feature = "inspector")] mut debug_instant: ResMut<ActionDebugInstant>,
) {
let (xform, mut forces) = body_query.single_mut();
@ -104,7 +97,7 @@ pub(super) fn input_forces(
// brake
for mut motor in braking_query.iter_mut() {
let factor = if input.brake { settings.accel } else { 0.0 };
let factor = if input.brake { 100.00 } else { 0.0 };
motor.data = (*motor
.data
.as_revolute_mut()