Only trigger stuck detection when against map obstruction.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ea881c0607
commit
880e79eb8d
|
@ -280,6 +280,7 @@ fn negotiate_path(
|
|||
Option<&RotationSpeed>,
|
||||
)>,
|
||||
rapier_context: Res<RapierContext>,
|
||||
obstructions: Query<&MapObstruction>,
|
||||
) {
|
||||
for (entity, mut actions, mut path, mut transform, collider, rotation_speed) in &mut query {
|
||||
let start_i32 = transform.translation.truncate().i32();
|
||||
|
@ -326,10 +327,11 @@ fn negotiate_path(
|
|||
collider,
|
||||
rapier_context.integration_parameters.dt,
|
||||
QueryFilter::new()
|
||||
.predicate(&|entity| obstructions.get(entity).is_ok())
|
||||
.exclude_sensors()
|
||||
.exclude_collider(entity),
|
||||
) {
|
||||
trace!("{entity:?} is stuck, hit: {hit:?}, TOI: {toi:?}");
|
||||
println!("{entity:?} is stuck, hit: {hit:?}, TOI: {toi:?}");
|
||||
// TODO: Remove when we have an actual character controller.
|
||||
transform.translation = next.extend(0.);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue
Block a user