playMaker

Author Topic: move along an arc  (Read 542 times)

ken168

  • Playmaker Newbie
  • *
  • Posts: 6
move along an arc
« 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?

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: move along an arc
« Reply #1 on: June 07, 2023, 07:54:34 AM »
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.

ken168

  • Playmaker Newbie
  • *
  • Posts: 6
Re: move along an arc
« Reply #2 on: June 08, 2023, 03:59:47 AM »
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