Professional Web Applications Themes

Click location - Macromedia Director 3D

Hi All, I'm currently creating a shockwave 3D scene which features a square plane model with a Flash Movie wrapped around it. When the user clicks on the plane, how do I work out the 2D co-ordinates of the click location in relation to the plane? I've tried using worldSpaceToSpriteSpace, but im not interested in the camera, rather im after something like (0,0) when the top left corner of the plane is clicked, and (1,1) when the bottom right is clicked. Thank you for any help! Chris...

Sponsored Links
  1. #1

    Default Click location

    Hi All,

    I'm currently creating a shockwave 3D scene which features a square plane model with a Flash Movie wrapped around it. When the user
    clicks on the plane, how do I work out the 2D co-ordinates of the click location in relation to the plane? I've tried using
    worldSpaceToSpriteSpace, but im not interested in the camera, rather im after something like (0,0) when the top left corner of the
    plane is clicked, and (1,1) when the bottom right is clicked.

    Thank you for any help!
    Chris


    Sponsored Links
    Chris Guest

  2. #2

    Default Re: Click location

    Chris: modelsUnderLoc can give you the #isectPosition in world space
    coordinates. You will probably have to do some math get it in the form you
    need. It can also give you #faceID and #uvCoord - either of which might lead
    you in the direction you want to go.

    Grampa Guest

  3. #3

    Default Re: Click location

    Here's a movie that allows you to detect the 2D coordinates of the texture under the mouse: http://nonlinear.openspark.com/tips/3D/uvtest/
    openspark Guest

Similar Threads

  1. Error: That location is controlled by another site.Please choose another location
    By zelen2 in forum Macromedia Contribute Connection Administrtion
    Replies: 0
    Last Post: February 24th, 03:36 PM
  2. Replies: 2
    Last Post: May 28th, 06:23 AM
  3. Single click vs double click in mouseDown and mouseUp
    By Alain Birtz in forum Mac Programming
    Replies: 3
    Last Post: September 3rd, 03:30 AM
  4. Move mouse cursor to X,Y location and simulate mouse click
    By WZSun in forum Macromedia Director Lingo
    Replies: 1
    Last Post: August 6th, 10:17 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139