im currently using blender
i wrote the transform properties for the 3d object and the transform properties for the camera.when i run the program,i cant see anything
Ive converted the 3d model to an egg file.
i used this code for the camera control
camera.setPosHpr(14.5, -15.4, 14, 47, -15, 10)
firstly i don’t even know what these values mean.
is there anything that im missing out on because i dont think im going about it the right way
Dunno about your code but you can check to see if the EGG file is good by using pview. Hit ‘c’ to center the model when you load it and hit ‘l’ to turn lighting on. That will give you a way of validating the model conversion was successful.
About “these values”.
It is never a good idea to use methods if you don’t know that they do or what the parameters are. But there is a way to find out: read about this method in the API reference.
In your case (“setPosHpr”) you will set (“set…”) position ("…Pos…") and orientation ( heading, pitch, roll, “…Hpr”) of the camera node path. Look at the last three values. The heading is 47 degrees. So you are looking to the side. Are you sure the object you want to see is inside the camera frustum? If the object is not in front of the camera then you won’t see it.
Browsing the API reference has other benefits too. If you look up a method then perhaps you see other methods of the same class too, methods you didn’t know they exist and can be handy right now or at a later point of time. For example “lookAt”.
If you can’t see the model, it’s probably that the camera is inside the model.
Zoom out a little bit by dragging with the right mouse.
he can’t zoom out, because he disabled the standard mouse control
Just leave the camera an its position untouched.
Further set the ‘y’ value of your model somewhere into the -y direction…
so write something like this:
myModel = loader.loadModel("modelpath/mymodel")
myModel.setPos(0, -50, 0)
This should position your model 50 units into the front of your camera. You’ll be able to see it now (if it isn’t too small or too big for this distance).
I think you making a confusion here or it’s me the one who is making a confusion.
It should be “model.setPos(0,50,0)”.
Correct me if i’m wrong:
Z+ axis is up
Y+ axis goes into the screen away from the view
X+ axis goes to the right
The render camera and any new camera you create is initially placed at pos (X,Y,Z)=(0,0,0) and has a rotation HPR=(0,0,0).
For those who aren’t familiar with Euler rotation or HPR this is similar to how the rotation in airplanes is described. If you played a flight simulator before this should be familiar.
H is heading rotation on the up axis of the plane and it turns the plane noose direction left or right.
P is pitch rotation on the wings of the plane (right axis) and it raises the plane noose up or down.
R is roll, which is a dangerous maneuver on an airplane and will make the the plane rotate on itself (it’s forward axis).
Ok so since the rotation of a camera by default is HPR=(0,0,0) the local axis of the camera coincide with the world axis.