playMaker

Author Topic: Force along iTween path[SOLVED]  (Read 3272 times)

cwmanley

  • Full Member
  • ***
  • Posts: 107
Force along iTween path[SOLVED]
« 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 :)
« Last Edit: December 20, 2013, 02:26:02 PM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Force along iTween path
« Reply #1 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

cwmanley

  • Full Member
  • ***
  • Posts: 107
Re: Force along iTween path
« Reply #2 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Force along iTween path
« Reply #3 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

cwmanley

  • Full Member
  • ***
  • Posts: 107
Re: Force along iTween path
« Reply #4 on: December 20, 2013, 02:08:09 PM »
Thanks, I was overthinking it.  ;D