How can we resolve jitter with Physics Constraint Components

If I have constraints in the physics asset for a skeletal mesh, then they retain their positions relative to the mesh even after having the underlying skeletal mesh moved by a movement component (for instance a WheeledVehicleMovementComponent) associated with their parent actor. This can be seen by choosing to show constraints and noting their relative positions.

However, physics constraint components added to an actor do NOT retain their positions relative to their parent actor unless it is not moving. As soon as its parent moves due to an associated movement component, the positions of the physics constraints lags behind until the actor is no longer moving.

I’ve tried making sure that the physics constraint components are updated after the movement component has ticked (by making that a prerequisite for the constraint component to tick). However, the constraint components continue to display lag behind the movement of the parent no matter what. This is true even if the position of the constrain is set to a socket location in the underlying skeletal mesh, which on visualization does keep its position as the mesh is moved. I realize that physically simulated actors / components do not keep their attachments and so I am wondering:

How can we make sure that physics constraint components associated with an actor and placed in their local space keep their exact same relative positions as the actor and all its components are physically simulated and moved via a movement component?

Try using physics constraint actors instead of components.

I think I just ran into a similar problem: I have a custom movement component with a custom pawn, and any attached particle system components seem to lag behind on the client, with lazy-looking updates. However if I use a ParticleSystem actor instead (by using SpawnEmitterAttached), the particle system stays with the mesh.

I’m hoping this is a bug in the engine that can be fixed soon, and not a limitation of using movement components.

Thanks for your reply. I’ll try this and update the thread with my result.

Well, I spawned a physics constraint actor at BeginPlay, attached it to my parent actor, updated its position in EventTick, and drew a debug sphere at its location. It drew the sphere in the exact same place it draws the sphere that indicates the location of my PhysicsConstraintComponent! So, no solution to the lag. :frowning: I tried setting the tick group on the physics constraint actor to later and later groups to see if it was an actor update ordering issue, but nothing made any change to its apparent delayed position.

Note that I am using a wheeled vehicle based parent actor, using a VehicleMovement component.

Sorry in advance if this was a red herring. My problem was caused by spawning the particle system components in the C++ constructor of another component. I don’t know why that would be a problem, but if I instead add the particle system component to my blueprint actor class, the component’s transform is updated properly (I just have to search for the particle system in my C++ class’s child components). I think part of the problem was that SetupAttachment was getting called from a component instead of an actor.