Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Gav (HeyBud) on September 16, 2018, 07:54:56 PM
-
If I want to move a physics2d game object to a desired x and y how do I know how much x and y to apply force to move in the direction of the object? Is there an easy way to do this? ??? Similar to Move To action but physics based.
-
Maybe with iTween Move To with Setting time ?
-
That would be great, but I think I tween move uses translate and not physics force. Am I wrong about that? The problem I'm having is when you translate, collisions are overridden or something. Only using force can you get good physics collisions.
I am beginner to Playmaker.
I don't get what you saying.
I faced a similar issue while started to learn. Found solution here
http://hutonggames.com/playmakerforum/index.php?topic=19365.msg84383#msg84383
:)
-
Yeah, that makes sense. So I guess my question is a math question. how do I calculate the vector i need to plug into 'set velocity' to move in the direction of another position? I want an object to move to another object using physics. This would be a super useful custom action!
I'm not good at maths.
-
Hi,
to get a direction, you substract the target position with your current position, that's your direction.
you then use that as the base vector to apply your force.
Bye,
Jean
-
This works thanks. It felt like I was over-complicating the question so i'm glad there's a simple solution.