(SOLVED)Rotate/point sprite to another object while maoving

Hi Devs,

Noob here - again, sorry.

My issue is:
I have a square sprite = ‘port’, place in the center of a screen. The player is a ship (top down). Player moves around with Smooth-camera set and the port will vanish from player’s view.
UI Layer: Has an Arrow that points always to the port. So, if the boat sails too far, player can use the arrow to navigate back.
It’s not quite a minimap (which I looked into and found it way to complex.

Currently, I have in Delta:
Arrow | Rotate towards port.X();port.Y() at speed 0 deg/second

The above works if it’s a pointing to a Mouse…just not a static sprite (eg Port)

I did other rotate actions with little success.

Thanks,
Rob

Having just stepped away from this for half an-hour… I thought about this some more. The arrow isn’t moving because the Port sprite isn’t moving. Only the Ship.

Hi,

could you post your events?

1 Like

I connected to the SHIP as a test. It doesn’t work with PORT.

1 Like

How about

1 Like

Your port and ship, I believe, are in a separate layer from the arrow?
You either transfer the arrow to the layer both ship and port are,
Or use Angle to Object between ship and port as the direction for your arrow.

2 Likes

okay, so i did experiment with AngleToObject() and lost that battle. I decided to put the arrow to Base layer (THANKS @Levio ) and modify the arrow sprite to a ring

And it works great.

Thanks All for your help.

Please RESOLVE this ticket.

2 Likes