Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: VascBogdan on January 27, 2015, 09:53:56 AM

Title: MoveTowards a DIRECTION, solution ?
Post by: VascBogdan on January 27, 2015, 09:53:56 AM
When applying Move Towards action, the object moves to a target location. Is there a way to extend the path for a certain distance ?

For example, a bullet. It will movetowards the direction of clicked position. What I want to do is almost the same as this.
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: wetcircuit on January 27, 2015, 01:48:58 PM
Try ADD FORCE... for turns try ADD TORQUE.... I have the same requirement and found an earlier discussion on this.... I haven't tried it yet so I do not know the pitfalls....
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: VascBogdan on January 28, 2015, 05:49:28 AM
I don't think it's Ok to do this. I still wait for someone who knows how to solve this.
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: Lane on January 28, 2015, 05:55:12 AM
Why not start moving it in a direction to begin with so you don't have to use an action that is designed to move something to a specific position at a specific rate?
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: VascBogdan on January 28, 2015, 07:14:06 AM
But how can I start moving it in a direction ? This is what I want, but I don't see an Action for that.
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: Lane on January 28, 2015, 07:37:04 AM
Translate.

Point the object in a direction, translate on Z which is the common forward direction in Unity.
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: VascBogdan on January 28, 2015, 09:45:28 AM
My game is in 2D, so I should get the X right ?
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: Lane on January 28, 2015, 09:48:15 AM
Z is forward, even using native 2d.
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: rik on January 29, 2015, 01:53:26 AM
Hi do you want to fire a game object for a point where you clicked ?

then you can use itween move to
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: VascBogdan on January 29, 2015, 07:02:54 AM
Hi. Well, it should go in the direction of a point, but it should exceed it. I am now trying with the Translate and the Force things. If you have a better ideea please leave a reply. Thank you.
Title: Re: MoveTowards a DIRECTION, solution ?
Post by: wetcircuit on January 29, 2015, 07:58:59 AM
I don't think it's Ok to do this. I still wait for someone who knows how to solve this.
You're welcome.  ::)