Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Mouse coordinates in world space

Mouse coordinates in world space

2003-11-20       - By Julie Anne Mayfield

 Back
Reply:     1     2     3  

Hey Silvio
   You'll want to use event.getWindowPosition.  That
will give you the mouse location in your viewport.
Then you have to figure out your location of the mouse
in view coords (ie flip your y coords.  These
functions conflict.  One has the y at 0 in top left,
the other in bottom left or something like that).
Then you can use the M3dView function viewToWorld.
This will give you a vector and a point shooting out
from your viewport in the direction of the mouse.

-Julie Anne

--- Silvio Terra <terrasi@(protected)> wrote:
> Hi.
>
> I know that I can get the screen coordinates of the
> mouse with
> event.getPosition( curSample->x, curSample->y);
> (curSample is just my own data structure)
> but I was wondering how can I get the world
> coordinates of where the
> mouse would be pointing at.  Even a vector pointing
> inside the screen
> would be OK, since I would be using this mostly for
> orthographic views,
> and as such, would not have a hard time computing
> the point of
> intersection with any planes.
>
> Thanks,
>
> Silvio
>
>
>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
> List-help:
> <mailto:listar@(protected)?Subject=help>
> List-archive:
> <http://www.highend3d.com/maya/devarchive/>
>


__ ____ ____ ____ ____ ____ ______
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
List-help: <mailto:listar@(protected)?Subject=help>
List-archive: <http://www.highend3d.com/maya/devarchive/>