need help with rotation toward an actor..

POMPOM Member Posts: 2,599
edited November -1 in Working with GS (Mac)
hey guys i need some help,
i want actor 1 ("arrow" - - movable) rotate toward actor 2 ("target" - - NOT movable) no matter where it is on the screen..
so that the front of the arrow always points the target, im trying to use vector to angel and
rotate to angle behavior but no success so far ;\
hope you can help me

Comments

  • synthesissynthesis Member Posts: 1,693
    You will need to report Constrained X and Y position values of the target and then use those values as your target in the chase actor.
  • POMPOM Member Posts: 2,599
    i have 2 game attributes Xposition and Yposition, that is constraining to the target position
    im trying to figure out how to rotate the chase actor to point those values
  • synthesissynthesis Member Posts: 1,693
    use the rotate to position behavior

    Set the GAME attributes for the target's X and Y position in that behavior relative to scene.
    Then set your desired speed or rotation...try about 150.

    That should do it.

    EXTRA TIP:
    You can use the Accelerate behavior in the same way to have the actor "chase" the target.
  • POMPOM Member Posts: 2,599
    it works.. but not fully functional,
    i mean my actor does rotate to target! but only 1 time,
    my "chaser" is moving (constrain to mouse positions) and i want the rotation to change toward the "target" actor at all time, but it does it only once
Sign In or Register to comment.