playMaker

Author Topic: Move Object only on local Z-Axis  (Read 1399 times)

jimmyneutron

  • Playmaker Newbie
  • *
  • Posts: 15
Move Object only on local Z-Axis
« on: August 05, 2016, 06:29:56 AM »
Hi Playmaker forums.

Struggling with something here that I feel should have an obvious solution but I can't figure it out. Basically I want to move cylinders only forward and backward on their local z axis in relationship to hand controllers. The way I am doing it now is I am getting the position of the hand controller and setting it to the cylinder, clamping on the X and Y axis, here is a link to a gif that will make this more clear...

http://i.imgur.com/wsexKHK.gifv

In the gif the first cylinder behaves as I want, hover the second does not. I guess the fact I am clamping their local X and Y positions is not the way I should be going about this.

So my question is, how do I move a game object only along one local axis?

Would be very grateful for any advice.

Cheers,
Jimmy.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Move Object only on local Z-Axis
« Reply #1 on: August 05, 2016, 09:29:31 AM »
Hi,
Maybe you can use "Get vector 3 xyz" and and "set vector 3 xyz"

or get the actions "Get Position Advanced" and "set Position Advanced" on the Ecosystem