Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: ken168 on June 07, 2023, 03:34:19 AM
-
Hi everyone, I have designed 2 types of monsters in my 2D game
One is moving in a straight line
One is to move along an arc
e.g. move from top right to bottom left
how do i make the monster move along the arc?
-
You can achieve this in several ways I think. For example with an animation. You could also use a bezier path (maybe best to use a plugin like ‘simple waypoints’. Or you could program the bend which I’m not sure if there’s ah action for it already. Me personally I probably would do the path option but I just recently read that Unity animations is actually a pretty solid solution for moving objects as well and should be used more.
Interested to hear more opinions about this as well.
-
I found a way, let's try it
First set up a FSM
Add translate to move it to X or Y
Then set the second FSM
Added Smooth Look At 2D
Set Target Position 2d, give XY coordinates
Adjust the XY coordinates, and the object will move in an arc
Let it run a little longer, it's actually going around in circles