Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Character "look" always at mouse position

  • #1, by denis- 13 years ago Zitieren
    Hello folks!
    I have a question... it's possible to set character always "look" at direction of mouse in standing animation?!? (es. if mouse is in right screen character change align to right... if mouse is at left...character align at left..(easy not?!?))grin
    Thanks!
  • #2, by afrlme 13 years ago Zitieren
    yeah I don't see why not...

    you would need to create a loop which checks if characters current state is idle & if so then get current mouse pos & do a bit of math (not my strong suit) to determine which direction the character should be aligned to.

    check out this compass script & demo by einzelkaempfer: https://www.visionaire-studio.net/shop/article/skript-demons... - the compass rotates around based on the current position of the mouse cursor in the scene. you could effectively take this script & modify it to suit your needs.
  • #3, by denis- 13 years ago Zitieren
    Thanks Lee!
    i tried to see how it work but.... it's a little bit hard. Anyway the idea was right!
  • #4, by afrlme 13 years ago Zitieren
    I haven't actually looked over the kompass script yet, so I'm not sure at the minute either! wink