Skip to main content

Meet

Meet can be useful for building tracking projectiles that always reach their target.

This method will cause the entity to move towards another until they are within 1 pixel of each other at a specified speed.

warning

This action could possibly never complete! Any actions chained off of it will not fire until the target is met. You will need to call .clearActions() to schedule new actions.

typescript
const missile = new ex.Actor({...});
const target = new ex.Actor({...});
// Track towards the target at 100 pixels/second
missile.actions.meet(target, 100)
typescript
const missile = new ex.Actor({...});
const target = new ex.Actor({...});
// Track towards the target at 100 pixels/second
missile.actions.meet(target, 100)