I am very new to the UE4. For my first project I decided to make a very simple ball maze game. While I still have some issues with the rotation of the maze itself, the sphere doesnt behave like I wish neither.
First of all, if I dont check “lock Z axis” in the details panel, the sphere will simply bounce straight up to the sky on any movement of the maze. If its checked the sphere doesnt really move like it should: If I tilt my maze forward the ball will, with high speed, move forward and then slowly moves backwards to the mid, even if the “move forward” button is still pressed. Sometimes the sphere doesnt react at all to the movement and will weirdly float around the plattform. Is there any trick to this? Please help me!
I think i know where it all goes wrong.
If you move or rotate maze by simply overwriting it location or rotation, that breaks physics calculations.
When you change location of physics object, for physics calculations it looks like that object just teleported. So it moved some distance in zero time, that means infinite acceleration, and that results in strange bouncing.
Try to move everything using forces only.
You can also disable gravity for ball, calculate new “fake” gravity vector (for eg from camera to center of ball), and apply force along that vector.
From player point of view it will look like gravity is always down, but you tilted maze.