Getting a vertex point

Ask a Question related to Macromedia Director 3D, Design and Development.

  1. #1

    Default Getting a vertex point

    Hello,
    I am trying to deform a plane (lingo primitive). You see, I want the closest
    vertex point at the location of a mouse click to jump down alittle in the world
    space. However, this is where I'm having somewhat of a problem.

    I want to avoid looping through each vector in the vertexList and by this way
    getting the vertex closest to my mouseclick. It just seams to demanding by the
    computer.

    So I thought I'd first start figuring out what row and column of vertices the
    clicked occured on, and using this information easily calculate the index to
    use in the VertexList.

    I thought I'd get the mouse's "impact" coordinates using ModelsUnderLoc() and
    then use the isectPosition-property. And this seames to work, my plane is 50 in
    length and isectPosition?s z-coordinate goes between -25 to +25. So I guess
    I've put that aside (just incase you guys wanted to know).

    I'd now thought I'd calculate the row by writing:


    tisec = tr[1].isectPosition
    _z = tisec.z

    tTileLength = ( float( pLength ) / pLengthVertices )

    row = ( _z / tTileLength )
    row = integer( row )

    But this doesnt give me the result I was hoping for.

    Any ideas?

    Thanks. :)

    ( more code can be obtained at [url]http://supertank.mine.nu/movie_help.dir[/url] )

    SuperTank Guest

  2. Similar Questions and Discussions

    1. vertex colors
      Hi, I'm using 3d studio max 5 and the vertex paint modifier to color face vertices. I just cant get the vertex color data to export correctly after...
    2. vertex keys
      is it possible to keyframe verteces (im using Max 6)? and can this be exported to w3d? thanks Greg
    3. Multiple (u, v) per Vertex
      Is is possible to index multiple (u,v) per model's vertex ? Director make it possible as we can see with the 8 channel multitexturing/multi(u,v)...
    4. 3D model vertex
      Hi everyone, I have a 3d box at (100, 150, 200) with 40, 30, 20 as length, width and heigh repectively. Is it possible to find the box's vertex...
    5. Delete One vertex
      Hi, I'm asking if it's possible delete one vertex from a mesh without must delete mesh and recreate it. It's possible ? Thanks regards,
  3. #2

    Default Re: Getting a vertex point

    umm, nevermind. Solved it myself. :)

    there's only 3 squares in either direction and I had 4 into my calculation.
    SuperTank Guest

  4. #3

    Default Re: Getting a vertex point

    I will continue update the the link. So if anyone want's to follow the progress of my little game. Go ahead. :)
    SuperTank Guest

Posting Permissions

  • You may not post new threads
  • You may 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