How do I make an arrow that circles the player but points to the mouse?

0 favourites
  • 4 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • I making a top down game my character is static and want to have a arrow that points towards the mouse to show where the character is facing.

    I want the arrow to circle the character and have the arrow always point towards the mouse.

    I already have the arrows set towards the mouse i just dont know how to have it circle the player.

    please help me

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Never mind, i found out you can use the orbit behaviour.

    i just used the orbit pin to pin my arrow to the character sprite at the start of the layout.

    then used everyTick to set the orbits rotation to "angle(dricarrow.ImagePointX(0), dricarrow.ImagePointY(0),Mouse.X,Mouse.Y)"

    if i have over complicated things please point it out though.

  • You don't need Orbit behavior for that. Here is the easiest method:

    On every tick:
    Arrow set position to Player
    Arrow set angle towards (Mouse.x, Mouse.y)
    Arrow move 50 pixels forward
    

    Or you can set the origin image point in the arrow sprite at x=-50 and then you won't even need the last line.

  • amazing thanks so much

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)