You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to find a way to calculate the speed of an object’s movement, relative to their front side / local axis. Like in the example from below.
What is the issue? Include screenshots / videos if possible!
Velocity.Magnitude gives an absolute number (not positive or negative) so there is no way to differentiate between directions.
And also, as this would be part of a vehicle that is not limited to just one axis of movement, I cannot just read the position property, as that is based on the World Axis.
Also also, I am aware of this solution, but my current script doesn’t really fit another loop in it. I made this post to look for alternative solutions to this, too.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
No, but I’m thinking that some constraints might help.
My use case is in a rail vehicle that, in order to imitate a faster braking speed, spins the wheels counter-clockwise to slow down faster. Problem is, this inevitably leads to it going backwards, which is really against what I already defined with my chassis. I wanted to run a check whenever it is applying this unconventional brake that would stop the process if the main part of the model starts going backwards.