playMaker

Author Topic: "Move Towards" Local?  (Read 1715 times)

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
"Move Towards" Local?
« on: September 17, 2018, 04:40:20 PM »
Hello! I do a vector3 calculation, then I need my camera (a child of another independently-moving parent) to move toward that vector3 - but in local space. For example, I'm moving it along ITS X axis based on distance from the player. But currently the "move towards" action moves the camera to, say the WORLD coordinates of X - 2.27 Y 0 Z 0, instead of along its SELF X axis. Can anyone help?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: "Move Towards" Local?
« Reply #1 on: September 18, 2018, 04:52:53 AM »
Hi.
Can you give more info on your setup?

Is the camera set as a child on an object.

Possibly move toward wont work so maybe you might need to use a float interpolate (or tween) and a set position , get the current x  and the target x to do the movement.