playMaker

Author Topic: Smooth Look At using up instead of forward?  (Read 1605 times)

MattBradley

  • Playmaker Newbie
  • *
  • Posts: 25
Smooth Look At using up instead of forward?
« on: September 17, 2015, 05:14:16 PM »
Hi there!

I've got a question about the 'Smooth Look At' node.

I have an object that I'm applying force to on its local x-axis and I want to keep its y-axis pointing at another object (lets call it the pivot) while doing so.

I'm using 'Smooth Look At' to lock the object so it's always rotated towards the pivot but I'm only able to get it working using the z-axis.

I suspect there's a way to get this working as I want quite simply, but I need a few hints. Maybe something to do with Quaternion Look Rotation?

Thanks,
Matt

MattBradley

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Smooth Look At using up instead of forward?
« Reply #1 on: September 30, 2015, 03:08:32 AM »
In case anyone comes across this in the future I managed to solve it by reusing the logic from this post: http://answers.unity3d.com/questions/858726/how-to-rotate-an-object-so-that-y-axis-faces-towar.html.

My FSM actions looks like this:


All happening on one node.