playMaker

Author Topic: Convert normalized vector (heading) to rotation?[SOLVED]  (Read 2111 times)

Mulbin

  • Junior Playmaker
  • **
  • Posts: 90
Convert normalized vector (heading) to rotation?[SOLVED]
« on: October 15, 2017, 02:33:35 PM »
I am trying to get an object to rotate to match the direction of another object's trajectory.

I have used Get Velocity to get a vector3
Then used Normalize Vector3 to convert it to a heading.
Now I want another game object to match it's rotation to mirror this heading.

Look towards doesn't work as I'm using a floating origin.
« Last Edit: October 17, 2017, 02:34:09 AM by jeanfabre »

MajorIdea

  • Full Member
  • ***
  • Posts: 131
Re: Convert normalized vector (heading) to rotation?
« Reply #1 on: October 15, 2017, 02:48:04 PM »
I do something similar with a "Smooth Look At Direction" action and plug the target's velocity into it.

Mulbin

  • Junior Playmaker
  • **
  • Posts: 90
Re: Convert normalized vector (heading) to rotation?
« Reply #2 on: October 15, 2017, 03:18:06 PM »
I've solved it!  I've realised I can use the regular look function as long as I multiply the vector enough to put it outside the range on my floating origin so it doesn't flip direction all the time.