Hi, is there a method to get the current vehicle movement axis? For example how much the vehicle is steering (negative value if it’s steering to the left, while positive value if it’s steering to the right), or if the vehicle is going on a forward gear, or if the vehicle is going on the reverse gear.
You can get the current gear and compare it to the value you like to find out if it is forward or reverse. And you also have access to front wheel angle.
Thanks, but I don’t think that the gear system is a good system for the Animation BlendSpace, because the animation is too fast. Is there a method to see if the car is going forward, or if the car is going backward? But not for example: if the car is going forward, return 1, while if the car is going backward, return -1, because with this method, the animation is played too fast.
This is how I did it for the steering angle:
Create a publicly visible float variable and set it in the vehicle BP:
Then in the HUD, I added this to print it onto the screen for debugging:
Just hook the cast into the “Event Receive Draw Hud” event.
When you cast the Pawn as a “wheeled Vehicle” as below, you get access to many of it’s properties, such as gear, speed, etc.
Thanks! I used the Speed for the Forward Axis.
I don’t use the Input Axis, because the animation is too fast.