2 Replies Latest reply on Jan 27, 2011 9:43 AM by bmberkowitz2010

    Using modelsUnderLoc information

    bmberkowitz2010

      Hi, I have properties that I've extracted using the modelsUnderLoc command in a behavior that's used on a 3d sprite.  I need to use the #isectPosition parameter to give a position vector to a model that I place in the world on the fly.  That portion of my script looks like this:

       

      pt = the mouseLoc - point(pSprite.left, pSprite.top)

      put sprite(pSprite).camera.modelsUnderLoc(pt, [levelOfDetail: #detailed]).isectPosition

       

      The output from the modelsUnderLoc with the detailed information within the message window looks like this:

       

      -- [[#model: model("036 OTHER Vertebral basilar"), #distance: 37.4722, #isectPosition: vector( -2.8409, -4.5276, -5.8558 ), #isectNormal: vector( -0.2357, -0.2357, 0.9428 ), #meshID: 1, #faceID: 1958, #vertices: [vector( -2.8551, -4.6074, -5.8793 ), vector( -2.8189, -4.4988, -5.8431 ), vector( -2.8913, -4.5712, -5.8793 )], #uvCoord: [#u: 0.6492, #v: 0.2563]]]

       

      How do I get only the #isectPosition vector out of all of that info?