Chaos vehicle stops movement when not in view

Hello everyone!

I’m using UE 5.1, and I have set up a chaos vehicle successfully, which is esentially a bogie for an articulated rail vehicle. I’m using a blueprint for that, which consists of 4 static meshes constrained together with physics constraints, and a chaos based bogie constrained to each mesh on the bottom as a child actor.

The vehicle runs smoothly, but here’s the problem: if the vehicle gets out of the view slightly, or the camera gets turned (doesn’t matter if it is the editor cam moving freely or the player cam) it stops, like it hits an invisible wall. If I move the camera so the vehicle better fits the view, it continues the movement. Now I’ve checked with every possible way that it is not some weird leftover collision that is causing the issue, thus I’m certain that somehow the viewport affects the simulation of the vehicle. The skeletal mesh of the bogie is set to “AlwaysTickPoseAndRefreshBones” so that shouldn’t be a problem either.

The chaos vehicle is not being directly possessed, instead the blueprint with the static meshes and constraints does, which passes down the vehicle controls to the child actors through a blueprint interface.

Above is a simplifed version of said blueprint, which suffers the same problem as the original one. (For testing purposes a constant throttle is being provided to the vehicle, but the problem persists if I am controlling the throttle directly.)

I have been struggling with this for a few days now, and I would love to hear some suggestions on where to continue with this issue.

Thanks!

I’ve been having a similar issue. Was trying to tow a vehicle and it worked fine when playing as Standalone or ListenServer, but when playing as client it would only work when the ListenServer had the vehicle in view. I experimented a bit further and even just pushing a vehicle in the UE5 Vehicle example project was causing issues when playing as client.

Looking through the code I found that for some reason UChaosVehicleMovementComponent sets
SkeletalMesh->VisibilityBasedAnimTickOption = EVisibilityBasedAnimTickOption::OnlyTickPoseWhenRendered;
in UChaosVehicleMovementComponent::OnCreatePhysicsState(). This seems to override any setting on the SkletalMesh properties.

So to solve the issue I set
GetMesh()->VisibilityBasedAnimTickOption = EVisibilityBasedAnimTickOption::AlwaysTickPoseAndRefreshBones;
in BeginPlay() of my vehicle class.

3 Likes

Thanks! The problem that has been bothering me for two months has been solved