Vai al contenuto principale

Ricerca

How do get an object's movement direction?

  • Spirit-X

    Is there? I've been having a look at them and the closest I can find it the Movement Sensor. It's gives you where you're pointing and it tells you how fast you're moving, but not what overall direction you're actually moving in.

    Just wondered if there's an easy way to get the info rather than having to make some kind of vector calculator or something.

  • Supposer

    The Velocity X/Y/Z gives you the speed it's moving in each axis. Which is also the direction it's moving in. And the way it's "pointing," right? Aren't they the same thing? It sounds like you've already found what you need. What problems are you coming up against? Maybe more context to this question would help.

  • Spirit-X

    Imagine a ship in space, it can move in any direction, regardless of where it may happen to be pointing. I'm working with that kind of thing. So yes I've got my X, Y and Z axis speeds, which together make up a vector and I can use that to work out a direction of movement. But rather than go through all the logic and figuring out to do that manually (I haven't done vector math since I was in school....which was 'a while' ago), I wondered if there's anything that actually tells you what direction you are moving in.

Accedi per aggiungere un commento.