Register collision only if player moves faster than 1 km/h
This commit is contained in:
parent
d4ad0070bd
commit
f08a7d726a
|
@ -245,7 +245,10 @@ void ACarlaVehicleController::OnCollisionEvent(
|
|||
FVector NormalImpulse,
|
||||
const FHitResult& Hit)
|
||||
{
|
||||
CarlaPlayerState->RegisterCollision(Actor, OtherActor, NormalImpulse, Hit);
|
||||
// Register collision only if we are moving faster than 1 km/h.
|
||||
if (FMath::Abs(GetVehicleForwardSpeed()) > 1.0f) {
|
||||
CarlaPlayerState->RegisterCollision(Actor, OtherActor, NormalImpulse, Hit);
|
||||
}
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
|
Loading…
Reference in New Issue