Open andnovar opened 8 years ago
Hey,
please take a look at https://github.com/thothbot/parallax/blob/master/tests/parallax-tests/src/org/parallax3d/parallax/tests/cases/interactivity/InteractiveVoxelPainter.java
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