Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: cwmanley on December 20, 2013, 10:24:28 AM

Title: Force along iTween path[SOLVED]
Post by: cwmanley on December 20, 2013, 10:24:28 AM
Is it possible to add force along a iTween path. I am trying to simulate the force of a very curvy river.

Thanks :)
Title: Re: Force along iTween path
Post by: jeanfabre on December 20, 2013, 12:54:28 PM
Hi,

 do you want to move an object on a path using force? or do you want to add force to an object using the path closest point from that object? I am not too sure what you have in mind here. But iTween is not a physics base framework so I am not aware of any implementation of forces within iTween.

bye,

 Jean
Title: Re: Force along iTween path
Post by: cwmanley on December 20, 2013, 01:34:21 PM
Hello,

I am trying do the latter I think. I would like to add a force in the direction a object(s) is moving along path.

 Thanks
Title: Re: Force along iTween path
Post by: jeanfabre on December 20, 2013, 01:56:28 PM
Hi,

 then, it doesn't really matter what drives that object, to get the direction of a gameobject, use the action "transform direction" and defines the local axis you want to use ( forward would be the z axis, so 0,0,1).

then you multiply this direction by your force amount ( a simply float multiplier, your direction being a normalized vector of magnitude 1), and use the result in your add force action.

bye,

 Jean
Title: Re: Force along iTween path
Post by: cwmanley on December 20, 2013, 02:08:09 PM
Thanks, I was overthinking it.  ;D