Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mulbin on January 15, 2017, 03:10:35 PM

Title: Get vector towards another object?
Post by: Mulbin on January 15, 2017, 03:10:35 PM
Hi, could anyone tell me how I get the vector from one object towards another?  I need to store it so I can then use forces towards/away from that specific direction.  Needs to be three axis.
Title: Re: Get vector towards another object?
Post by: jrock84 on January 15, 2017, 11:02:56 PM
You could use Get Vector XYZ, I believe it is, and use itween move to for your move.
Title: Re: Get vector towards another object?
Post by: mdotstrange on January 16, 2017, 02:41:08 AM
Subtract one Vector3 from another to get the direction- can use the Vector3 Operator for that then use Vector3Normalize on the direction- then apply the direction as a force etc to move objects towards/away from others-

Can multiply the direction by a float to reverse it/make it stronger/weaker