-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to convert screen coordinates to world coordinates ? #90
Comments
Hey, please take a look at that may help you |
Hey thanks for the quick response. I think perhaps it could be convenient to add this to the API to give the camera a ScreenToViewportPoint method. |
What about if you don't have objects to RayCast or if you want to place it on an empty space ? |
Yeah, ok, lets track the enhancement |
Yeah, in example sent you this code creates a new cube after mouse click Mesh voxel = new Mesh( cubeGeo, cubeMaterial );
voxel.getPosition().copy( intersect.point ).add( intersect.face.getNormal() );
voxel.getPosition().divide( 50.0 ).floor().multiply( 50.0 ).add( 25.0 );
scene.add( voxel ); |
Hi Alex, yes,it does but it needs to intersect something. I am working it around creating an invisible plane to intersect with. I am doing like a 3d editor. |
yep, it is good idea |
I was wondering whether AnimatedScene or camera have a way to know the world position once you click on the screen coordinates. Something like this in Unity --> http://docs.unity3d.com/ScriptReference/Camera.ScreenToViewportPoint.html
Thanks in advance
The text was updated successfully, but these errors were encountered: