Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: TomsTales on November 04, 2020, 06:48:06 AM
-
Hi Guys,
new to Playmaker and Unity in General, so...
I am getting crazy about this. I would like to have a simple "Click ob Object, Click somewhere else in the Scene, Object moves to this Point".
I found several things for 3D but not for 2D and I just can't make it work. It can be as simple as possible...I found Move Towards and stuff but this just moves the object with no control...
Argh!
Cheers
-
To add, the idea is to "respawn" if you will the object where I do the second click. or drag it. I don't care anymore at this point lol
-
Hi.
Which Part you can't get to work.
can you select a object?
can you select a position to go to?
-
Hey mate,
well basicallyI have been using this tutorial by Dumb Game Dev:
Everything runs as intended until well, it comes to the actual movement I guess. I think selecting the object will work, but moving it does not. There is a comment in the video saying
For 2D movement use:
Mouse pick 2d
and
Move towards
but I can't implement this. Also I take the easiest way possible as for now, I don't really care if the objects really "moves" or just" teleports to the new position....
Cheers
-
Hi.
I think to position you need to do something like :
on mouse clicked, get mouse x and y, then use 'Screen to world point' to get to 'word position' that you clicked.
then move to that position.
-
Thanks man, I will try later!
-
Hey, maybe you can give me some more detail as I am stuck...I tried what you said but it stops at get x and why and does not move to screen to world...
-
Hi.
On the playmaker window, if you select the state tab.
On the bottom there will be a checkbox called 'Debug' turn that on so you can see on you action what values it gives while playing (and while not playing as well).
I can see that you have a object on the move toward. you need to leave that empty. (read the description of the move toward action :) )
if its the object that you want to move then click on use owner and select specify game Object, then you get another slot to place a game object.
Place the object there, that you want to move.