How to Constraint Rotation of a Capsule Component dynamically

I know I can do it through Capsule Component → Details. but i can’t find any function to Constraint X Y Z rotation of Capsule component during gameplay, not before play.

I 've tried to manually rotate to 0,0,0 on Tick() but its so bad it still rotates before flipping back to 0,0,0.

How to best constrain it would depend on what makes it rotate, and there’s half a dozen ways. Do tell what makes it turn.


image

But again, this may not work - really depends on what is going on.