add prev vel to body
This commit is contained in:
parent
ff9b1671b1
commit
8a440d6e81
3 changed files with 8 additions and 4 deletions
|
@ -38,7 +38,7 @@ impl Plugin for CyberActionPlugin {
|
|||
reset_wheel_forces,
|
||||
cyber_lean,
|
||||
falling_cat,
|
||||
input_forces,
|
||||
wheel_forces,
|
||||
drag,
|
||||
)
|
||||
.chain(),
|
||||
|
|
|
@ -137,7 +137,7 @@ pub(super) fn wheel_forces(
|
|||
&mut PreviousVelocity,
|
||||
Option<&CyberSteering>,
|
||||
),
|
||||
With<CyberWheel>,
|
||||
(With<CyberWheel>, Without<CyberBikeBody>),
|
||||
>,
|
||||
mut body_query: Query<
|
||||
(
|
||||
|
@ -146,7 +146,7 @@ pub(super) fn wheel_forces(
|
|||
&mut PreviousVelocity,
|
||||
&ReadMassProperties,
|
||||
),
|
||||
With<CyberBikeBody>,
|
||||
(With<CyberBikeBody>, Without<CyberWheel>),
|
||||
>,
|
||||
wheel_config: Res<WheelConfig>,
|
||||
rapier_config: Res<RapierConfiguration>,
|
||||
|
|
|
@ -8,7 +8,10 @@ use bevy_rapier3d::prelude::{
|
|||
};
|
||||
|
||||
use super::{spawn_wheels, CyberBikeBody, Meshterial, WheelConfig, BIKE_BODY_COLLISION_GROUP};
|
||||
use crate::{action::CatControllerState, planet::PLANET_RADIUS};
|
||||
use crate::{
|
||||
action::{CatControllerState, PreviousVelocity},
|
||||
planet::PLANET_RADIUS,
|
||||
};
|
||||
|
||||
pub(super) fn spawn_cyberbike(
|
||||
mut commands: Commands,
|
||||
|
@ -63,6 +66,7 @@ pub(super) fn spawn_cyberbike(
|
|||
Sleeping::disabled(),
|
||||
Ccd { enabled: true },
|
||||
ReadMassProperties::default(),
|
||||
PreviousVelocity::default(),
|
||||
))
|
||||
.insert(TransformInterpolation {
|
||||
start: None,
|
||||
|
|
Loading…
Reference in a new issue