How does one know?
Situation
I am building a 3d space sim. All pawn movement is done with player inputs to activate physics thrusters on the mesh. There is no fiddling with the transform in the code; I just allow the physics engine to calculate everything. This part works perfectly and it’s super cool to see the spaceship tumble and slide around doing it’s thing.
Feature
Display an indicator at future positions, say from a braking thruster action. Example: I want to determine where the rotation of the ship will be once the braking thrusters have completed firing. To do so, I grab the pawn angular velocity, calculate the deceleration, calculate the braking distance, create a new rotator using axis/angle, then display an indicator at the future stopped position.
Problem
The indicator, while pointing to the correct position, vibrates violently. I have tried: 1) smoothing the data using an array to calculate a moving average of change, 2) use world space so that the indicator isn’t trying to fight the mesh rotation that it’s a child of, 3) increased time delta between calculations. Nothing seems to work though.
I’m at my wits end, and am starting to wonder if my approach to this is just not doable in a computer science sense of the word.
Any thoughts on how to proceed?