-
Hi, I have 3 questions, all related to actor movement.
I'm trying to make a click to move but the movement is not going in the right direction.
Thanks :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @salsa2k
public MoveTo(evt: ex.Input.PointerEvent) {
this.actions.moveTo(evt.worldPos, this.playerSpeed);
}
Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
I know that this discussion is old, but I'm trying to implement easystar (https://github.com/prettymuchbryce/easystarjs) |
Beta Was this translation helpful? Give feedback.
Hi @salsa2k
evt.worldPos
in yourmoveTo
no need to do any arithmetic on the pointer event world position.moveTo
let's you specify an absolute word position,moveBy
would be relative to the current actors position👍You can stop any running actions with the
this.actions.clearActions()
, I'll admit that method doesn't have the best name... perhaps "stop()" or "stopActions()"?We don't have anything built in for pathfinding, but we have done A* pathfinding in a jam game before (warning old version of excalibur). In this example we build up a grid of po…