How to cast to the location of a separate Actor on an input event?

Top bit is the coin toss, bottom is the launch:

Script to copy:


how can I get the location of an object in the world on an input event to get a Vector to launch the player

You could store the location only as a vector but then you’d need to wait for the coin to stop moving. So we store a reference to the spawned actor instead. One thing that’d need adding here before jumping away is to check whether last coin is valid - perhaps something scooped it up! Better safe than sorry (and coinless).

1 Like