|
Bitt Toll
Registered User
Join date: 8 Jan 2007
Posts: 10
|
01-16-2007 14:56
You seem to be able to get the camera position and rotation, and set the focus, but I can't figure out how to determine what spot the camera is focused on?
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
01-17-2007 07:38
You're exactly right. I've asked about this before, no way to read the focus. Only set it. You might be able to calculate from rotation and position, but that will give you a path and not necessarily where the focus is in a vector position.
|
|
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
|
01-17-2007 09:45
I've mentioned this here before - the Second Life camera doesn't have a "focal length", so if it's pointing in a particular direction, it could be considered "focused" on any of the points in a line extending away from the camera in that direction. Thus there's no way to identify any single one that it's focused on, but any of those points will do.
Using ALT+drag movement to move the camera doesn't "focus" the camera on the object you clicked on - try holding alt+ctrl+shift and moving the mouse to translate the camera and it easily moves away from it's previous "focus" point. It's just a handy way of creating a reference for movement.
|
|
Bitt Toll
Registered User
Join date: 8 Jan 2007
Posts: 10
|
01-19-2007 08:53
That doesn't seem to be true because once the camera reaches the point you clicked, it doesn't continue to move forward through it in a straigh line, instead, it seems to start zooming in on that point. In other words, if you alt+click on a wall, and then move the camera forward, it doesn't move through the wall and keep going.
Finally, llSetCameraParams takes a focal point as an argument, not a rotation.
|
|
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
|
01-19-2007 09:03
From: Bitt Toll That doesn't seem to be true because once the camera reaches the point you clicked, it doesn't continue to move forward through it in a straigh line, instead, it seems to start zooming in on that point. In other words, if you alt+click on a wall, and then move the camera forward, it doesn't move through the wall and keep going. This is a property of the user interface used to position the camera, not the camera itself. From: someone Finally, llSetCameraParams takes a focal point as an argument, not a rotation.
I think (although I'm not positively sure) that's because it's less work to convert a quaternion to a point (just one multiply operation) than to convert a point to a quaternion. So that way, llSetCameraParams supports people wanting to set the focal point or set the rotation with the best possible performance. The actual effect of that llSetCameraParams is identical for any focal point on the line drawn out from the camera's centre at a given rotation. For the camera control system I make, the user sets the actual position of the camera using ALT+zoom (so they will be focusing on an object), then the script reads the camera location and rotation from llGetCameraParams. When it sets the camera back to that location, it sets the focus point to be 1m from the camera along the rotated axis - but the result is identical to how it looked when the user moved the camera themselves, focused on the object.
|