Thank you very much for the reply I am gonna try this.
On Sun, Jul 19, 2009 at 10:34 PM, ben <[email protected]> wrote:
>
> Hi sasMaster.
> Most of time this works like this :
> In fact you can imagine that you're gonna project your mouse x/y
> coordinate at a certain distance using the camaera perspective,
> a kind of ray from your mouse.
>
> var ray:Number3D = view.camera.unproject(view2.mouseX, view2.mouseY);
> ray.add(ray, view2.camera.position);
> ray.
>
> but now you have to deal with at wish z level you want your mouse to
> act, and this delas more with what you're trying to achieve.
> tell me more : get intersection with object, draggin, look at mouse
> position, etc ????
>
> anyway, if you want a custom 3d cursor, and you want to place it where
> the interaction appens, I suggest you to use the e.sceneX,e.sceneY and
> e.sceneZ of a MoseEvent3D :
> when adding a mouseEvent3D you can retrun the position in the 3D space
> where your mouse is projected.
> ex :
> scene.addOnMouseMove(posTest);
>
> function posTest(e:MouseEvent3D):void
> {
> your false cursor must be an Object3D, this can be for example a
> dofSprite or any billboard object.
> cursor.x = e.sceneX;
> cursor.y = e.sceneY;
> cursor.z = e.sceneZ;
> cursor.moveBackWard(10); /// to keep a distance from the surface
> }
>
>
>
>