Description

In ChaosVehicleMovementComponent::CalcThrottleBrakeInput, autobrake is set when a vehicle is stopped - this means that when the car is virtually stationary, the BrakeOut inout parameter is always 1.

This is then picked up in the ChaosVehicleMovementComponent::ProcessSleeping in the bControlInputPressed local variable as being being greater than the wake tolerance, and then actively wakes up all bodies in the ChaosVehicleMovementComponent::SetSleeping method. This is then sent to the physics engine, and the root is woken up.

Meanwhile, the island with the car body in it, being stationary is incrementing a counter, and when that is high enough the island is put to sleep - but only for 1 frame before the vehicle system re-wakes it from the first description.

It it worth calling out that these are 2 different sleep systems managed by 2 different parts of physics. One controls the car, and one controls basic primitives with no higher level knowledge.

The net result is that our vehicles do not sleep when stationary due to auto brake

Steps to Reproduce

Create project with a Vehicle. Move and then stop the vehicle with debug output on or CVD, you'll see the vehicle is awake most of the time followed by a brief flicker of sleeping for a single frame.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-254108 in the post.

1
Login to Vote

Unresolved
ComponentUE - Simulation - Physics
Affects Versions5.5
CreatedMar 5, 2025
UpdatedMar 5, 2025
View Jira Issue