Professional Web Applications Themes

Click location in model - Macromedia Director 3D

Does anyone know if there is a way to calculate WHERE in a model the mouse is clicked? This is what I want to achieve: I have a box model with one side open, which represents an empty closet. I want to add a shelve in the closet at the height the user clicks. Ergo, I need to know the y-position of the mouse position within the model compared to the top and bottom of the box model....

  1. #1

    Default Click location in model

    Does anyone know if there is a way to calculate WHERE in a model the mouse is
    clicked? This is what I want to achieve: I have a box model with one side open,
    which represents an empty closet. I want to add a shelve in the closet at the
    height the user clicks. Ergo, I need to know the y-position of the mouse
    position within the model compared to the top and bottom of the box model.

    Wriker Guest

  2. #2

    Default Re: Click location in model

    You might use spriteSpaceToWorldSpace to get the y at the time of clicking.
    Otherwise you'd need to use modelsUnderLoc, levelOfDetail #detailed to get the
    intersected face world coords... more complicated and you'd need a mesh with a
    lot of faces. The y value spriteSpaceToWorldSpace would just need to be offset
    by some factor so you get the shelf positioned correctly.

    tedalde2 Guest

  3. #3

    Default Re: Click location in model

    Thanks for the response. I wasn't sure how exactly to calculate the exact
    position within the model with spriteSpaceToWorldSpace, but I eventually found
    this article which explains it all:

    http://director-online.com/buildArticle.php?id=1141#dotProduct

    Wriker Guest

Similar Threads

  1. Click location
    By Chris in forum Macromedia Director 3D
    Replies: 2
    Last Post: May 9th, 01:41 AM
  2. click on model to resize it
    By Eddie in forum Macromedia Director 3D
    Replies: 2
    Last Post: February 9th, 09:00 AM
  3. Click Model Go To Marker
    By el basha in forum Macromedia Director 3D
    Replies: 2
    Last Post: January 18th, 11:28 AM
  4. not selecting model on click
    By GracieMM in forum Macromedia Director 3D
    Replies: 5
    Last Post: December 13th, 10:38 PM
  5. Select model by click
    By HallyL in forum Macromedia Director 3D
    Replies: 1
    Last Post: October 8th, 09:36 PM

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