Sprite return to player

Hi Devs,

I’m trying to create a game where:

  • Player holds L mouse button
  • new sprite ‘beam’ is created (once), which then moves towards your cursor & stops. (this part works apart from stopping).
    If mouse released, the beam, returns to the player. (this doesn’t work).

The idea is… the beam is a tractor beam, and it catches objects in its path and takes it back to player… this I’m still workng on.

I created a scene var to limit the number of times the beam can be used - still working on this also.

UPDATE: I’ve cleaned this bit up.


So what happens now is it just stops when LM released.

UPATE:

I’m a serious noob - please help.

Hi. I don’t know if this will solve all of the problems but when you apply the return force it’s applying a force in the opposite direction and I believe it’s basically canceling out the current force. You can use the action that removes the forces and then apply the force in the direction back to the player

Thanks @Keith_1357, that fixed that issue. Much appreciated.

1 Like