What I’m trying to do is make a vehicle rotate for stunting when the car is in the air. It works so far, but the rotation uses the world axis as opposed to its forward vector.
How would I fix this? Here’s the blueprint for reference:
What I’m trying to do is make a vehicle rotate for stunting when the car is in the air. It works so far, but the rotation uses the world axis as opposed to its forward vector.
How would I fix this? Here’s the blueprint for reference:
I’m confused as to what you’re trying to achieve here. Your description isn’t in-depth enough and your setup is completely non-sense in this regard.
Are you trying to rotate the car around the forward axis? Because your setup there rotates the world right vector around the forward axis, which is going to be completely arbitrary.
Consider the following image. The rightwards vector is the one you’re making, the other is an arbitrary forward vector of your presumed car.
Now rotate the right vector in such a way around the forward vector that it’s tip has the same orthogonal distance to the v1 vector. That’s what RotateVectorAroundAxis
does.
Furthermore, you’re rotating v1 around the axis by 0 degrees - in other words you’re not rotating it at all. It remains (0|1|0) after the rotation. So yes, your car will continue to rotate around the world right vector.
You might try just plugging in your pawn’s forward or right vector into the angular velocity, multiplied by an arbitrary factor. That could give you the desired result.
At least I thought it worked. It still doesn’t rotate forward locally at all. It still does what’s in this webm: Dropbox - File Deleted - Simplify your life
Here’s the blueprint. Keep helping me out with this @Zyr as you’ve been very helpful so far.
The forward vector you’re getting there is the wrong one. The one you had used before is the one you’re looking for, or this one. The one you got there is a forward vector, calculated from the world’s forward vector rotated about the given rotation - in this case 0|0|0, so it’s the world forward vector = x axis.