Hi,
I would like to create something like a car (a hovering car at this point …) by myself.
Therefore, I created a new Pawn with a Cube as the root element. Now i ran into two problems:
- I would like to add a constant force to the cube so that it is floating above the ground. This is why I would use the tick event to add a force into the Z direction on the cube. But as expected, it gains height over time - but I want to add a force so the distance to the ground stays constant. How can I achieve that?
- Additionally, I would like to accelerate the cube whenever the “Accelerate” Event is triggered. It should behave like the acceleration of the game “Micro Machines”. An impule should be added to the cube into the direction the cube faces. But this direction has to be into the worlds X-Axis. I do not want to add an impule to the ground if the cube is rotated towards the ground. I hope I made myself clear why “GetActorRotation” is wrong.
Thank you very much!