Hi guys,
I’m trying to do something incredibly simple that for some reason is very difficult to find answers for.
I’m doing a lot of manual physics stuff for a glide racer game, which means I’m doing a lot of my own math and equations that govern how things move and collide etc.
One of the things that has me stumped is that when I have my sphere (Pawn) go up a ramp, it’s understandably rolling. I’ve locked X and Y rotation easy enough, but if I lock Z rotation as well, I can no longer turn (since I am using set rotation function to turn using the A and D keys). So I need Z rotatable, but on the ramp, this makes the ball steer upward towards the ramp.
The red arrow shows what it is doing. I let it go, and it rotates to the right, up the ramp.
I already have code in place for simply going upward in the same direction via vector projection, but it relies on the forward vector to not be modified, and it is being modified by Unreal.
So my issue is, how do I stop the ball from rotating on collision? Can I disable physics but still generate hit events (i need the hit events to process my collision logics)?