Hello, I am in the process of making a scene component that when attached to an object will apply a force (gravity) in a specified direction and, if enabled, reorient the object so the bottom will rotate towards the direction of the appling force.
The gravity force part is done and works great however whenever I start setting the world rotation it starts to lag during simulation in the editor. If I set EnableGravityOrientation to false it works fine
So I updated it, I added PrimaryComponentTick.TickGroup = TG_PrePhysics; under the bCanEverTick and I made sure the SetWorldRotation was a TeleportPhysics but still it’s causing the jittering effect
you’re calling this on tick, right? not a timer function?
It seems like something about setting rotation is overriding the physics “sometimes”. but then its catching up. You could also try setting tick to post physics.
I’ve had odd problems like this before too, usually comes down to the tick group.
Instead of using set rotation, you could add torque proportional to the current angular velocity.