Really don't understand the Local Velocity!

I really don’t understand the line that converts global velocity to local velocity. Like are you saying that the magnitudes are not the same for both? If the nav mesh agent is travelling at 5m/s, in global space, it might be travelling at 50m/s???, then when you pass that param into animator, the blend tree will let the agent run. The angular velocity is purely controlled by your navigation avoidance system. So I did not understand Rick’s comment about moving forward and stuff.

Think of it like this. You’re on the planet Earth. When you’re driving, you’re moving, say at 60kph, but that 60kph is relative to the Earth. That’s local velocity. In reality, the earth (and by extension, you too) is moving extremely fast in the universe… That is global velocity.

Makes sense?

1 Like

Yeah, I guess it makes sense, I tried with velocity.magnitude to replace the code, it also works, which means local and global velocity magnitudes are the same. But I guess your way is more vigorous.

If the object doesn’t have a parent (or parent isn’t moving), then yes, it’s going to be the same.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.