A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: help! character symbol turns direction of mouse position??

  1. #1
    Member
    Join Date
    Jan 2001
    Posts
    68
    What I want to do is that where ever the mouse pointer is, I want the character of my game to turn in that direction. I've created the different angles for the character so that it can be seen from side, back and front view. I want the character to turn according to the mouse pointer position. How do I go about doing this? I've tried looking around for help on this but I've only come across mouse trailer effects. Perhaps its becaues I'm not using the right search string.

    Any help on this is greatly appreciated. Thanks in advance (:

  2. #2
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    It's all about trigonometrics (geometry), get your old highschool maths books, look for the chapters on the properties of triangles and apply the formulas to your need.

    It's exactly the same thing...just establish what is the datum you need, and the datums you have...then find a connection between them!
    (I can understand it can get difficult if you're not confident with the actionscript language..)

    hope this helps!

  3. #3
    Member
    Join Date
    Jan 2001
    Posts
    68

    totally confused!

    Uh . . . you've completely lost me. Oops! (;

    Um . .hmm maybe this link will help:

    http://www.spin.com.au

    go to the "our sites" and then choose the "M&Ms find red" option and that will display the yellow M&M character - which is what I'm tryin to do.

    (;

  4. #4
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    that's exactly what I was talking about..if you want to do it the pro way, you should give it a try with maths...this will give you far more freedom in creating interactions.

    Just have to recognise the triangles that are formed between the cursor and the character (always 90° triangles) I can see you tried something to make the character walk to the clicked point, but it's not that good to see it walking on the x and y axis'....it's kinda fake.

    Anyway once you've got an angular datum or something, you can build a small script that goes to the right frame of a "anglesMC"...(that contains the full turnaround).

    Cheers!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center