Is there a simple way of positioning a 3D object to always be at the
same screen position? I have a targeted camera and need for one object
to always be at the same stage position (top left). Any suggestions
welcome!
thank you,
Jerome.
To unsubscribe from this group, send email to away3d-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
I am using Away3D lite and it doesn't provide the moveForward,
moveLeft shortcuts, or does it?
Cheers,
Jerome
Jerome
To unsubscribe from this group, send email to away3d-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
I managed to target the camera to a Plane and have that plane looks at
the camera. It defines a nice rectangle where the top left corner
would be the spot where my navigation should seat. I can get the
coordinates with a MouseEvent3D (using the event.scenePosition) but I
don't know how to generate that using UVs in Lite...
I'll upload a screencap of the setup: jj-plane-screencap.png
Last resort would be to create a separate scene for that nav... But I
am sure there's a way!
Thank you,
Jerome.
Here's the "general idea" code:
var scenepos:Vector3D;
var p:Point = new Point(-400, 50);
var uvt:Vector3D = _targetNull.faces[0].calculateUVT(p.x, p.y);
scenepos = camera.lens.unProject(p.x, p.y, uvt.z);
scenepos = camera.transform.matrix3D.transformVector(scenepos);
navigation.updatePosition( scenepos );
Target null is an invisible plane that's used to target the camera and
it itself looks at the camera... Works like a charm!!!
I'll upload a screen cap :P
Cheers,
Jerome.
To unsubscribe from this group, send email to away3d-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.