playMaker

Author Topic: Setting iTween vector offset with a variable  (Read 3149 times)

tnaseem

  • Playmaker Newbie
  • *
  • Posts: 7
Setting iTween vector offset with a variable
« on: July 01, 2012, 02:56:08 AM »
Is there any way to set the 'iTween MoveTo' Action's Vector Position as a variable (or at least a way of accessing the vector via a script, so I can set it?)

I need to be able to change this vector during the game, as an offset relative to 'Self'. I did try to have a dummy GO set, and used that. However, that only treated the transform position as a world position, despite selecting 'self' in the action.

It would be good to allow this vector to be set as a variable.

Any help would be most appreciated!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Setting iTween vector offset with a variable
« Reply #1 on: July 04, 2012, 03:07:29 AM »
Hi,

 I am not sure you can do that even in script, changing iTween settings as it runs. I might be wrong tho.

I would parent that gameObject ( "A" ) you tween, tween the parent instead and then move "A" position to achieve your offset.

 Bye,

 Jean

tnaseem

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Setting iTween vector offset with a variable
« Reply #2 on: July 04, 2012, 06:54:33 AM »
Many thanks for your reply, Jean.

I didn't mean change the vector value as the tween is running, but be able to set the value as a passed variable to the action, as well as the GameObject and entered vector values as is current - Much like you can with other actions.

That way I can set the offset vector (to _Self) in game and pass it to the action prior to executing the state. Hope this makes sense. I'm a bit crap at explaining things :)

Cheers,
Tarique.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Setting iTween vector offset with a variable
« Reply #3 on: July 05, 2012, 04:26:56 AM »
Hi,
 
 Yes, not too sure :) could you provide a example?

bye,

 Jean