Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
a question about camera.lookat()
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: a question about camera.lookat() (Read 4269 times)
qjvictor
int
Posts: 77
a question about camera.lookat()
«
on:
January 11, 2007, 08:50:25 pm »
camera.lookat() at an object, it will put the object in the center of the screen. Can the camera look at the object but the object is not in the center, ie, in the left or right part of the screen. notice that the object will keep on moving.
Logged
cyberkilla
float
Posts: 413
a question about camera.lookat()
«
Reply #1 on:
January 11, 2007, 09:40:34 pm »
once its facing, in the center of the screen, perhaps you can rotate the camera manually to put it off center.
Logged
http://futurerp.net
- Text Based MMORPG
http://beta.rpwar.com
- 3D Isometric MMORPG
qjvictor
int
Posts: 77
a question about camera.lookat()
«
Reply #2 on:
January 11, 2007, 10:08:59 pm »
Thanks for the reply.
Can I get the rotate angle of the camera comparied with the init position?
The problem is that how I know the angle's value?
Logged
EgonOlsen
Administrator
quad
Posts: 12297
a question about camera.lookat()
«
Reply #3 on:
January 11, 2007, 11:06:53 pm »
You can get the camera's rotation matrix (you may have to invert it depending on your needs) and derive the rotation angles from this like here:
http://www.jpct.net/forum/viewtopic.php?t=576
However, this code is untested yet...at least by me. May work, may not...
Logged
halcor
byte
Posts: 28
a question about camera.lookat()
«
Reply #4 on:
January 12, 2007, 03:43:05 pm »
Maybe you can parent an empty object to the object of interest and then camera.lookAt() that empty object. For example, place an empty between the eyes of a head of a human mesh, parent the empty to the mesh and camera.lookAt() the empty - you get camera tracking on the eyes
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
a question about camera.lookat()