Hi John,
In Prefab3D, a hovercamera is set up by default to look at center.
Now in your Away3D project, the default camera is Camera3D.
so to make it simple, lets say it looks a certain point in space by
default.
Now you add your model, and place the camera else where
There is still nothing that make the camera look for sure at your model
for same price its looking the other way.
So first thing to do is once you have added your model to away3D scene
if you use Prefab3D that would be as3, awd or obj outputs
so in case of as3 output you can do for instance the followwing
var myclass:MyOutputedClass = new MyOutputedClass();
view.scene.addChild(myclass);
then you could try say
view.camera.lookAt(myclass.position);
k, now you are sure it looks at it.
you see nothing yet and no errors?
make then sure you set up an enterframe event or at least
use once after you have addchilded and set camera the magic line:
view.render();
There is also one more case where you could not see something, in case
you use planes or flat objects
and they are on the xy plan and your camera is at y = 0;
Since planes have no thickness, you would not see a thing...
fix is either rotate on X the plane 90 degrees or increase the y of
the camera
also setting property bothsides can help you find them back in space.
(once you have set up.
One good practice is also to set up a Trident, to have some visible
help in space, its placed at 0,0,0
import away3d.primitives.Trident;
and in your code, once view exists
view.scene.addChild(new Trident(1000, true));
let me know how it goes...
and btw, welcome to Away and Prefab!
Fabrice
On Oct 29, 2009, at 10:53 PM, Sunil John wrote:
So I'm using preFab to set up my Away3D. preFab says my camera
distance is 13069. In my own application I set a 3d model in my scene
at 0,0,0 and camera.z at 13069 but I don't see my model. And my camera
is looking at the origin.
What does "Camera distance" represent in preFab for Away3D? I know
Fabrice mentioned that Camera distance is the distance of the camera
from the model, the default being (0,0,0). But the value in preFab is
an Number, 13069, and not a Number3D, with x,y,z...Any ideas how to
recreate my preFab camera pos?
Best Regards,
SMJOHN