camera functionality issue

23 views
Skip to first unread message

ShoutMe

unread,
Jan 21, 2020, 5:42:00 AM1/21/20
to OpenSceneGraph Users
I am trying to create a camera functionality that pans the camera side by side but when it reaches the bounds of geometry we shouldn't be able to pan camera anymore. The functionality also includes zoom in and zoom out
Message has been deleted

Robert Osfield

unread,
Jan 21, 2020, 9:27:53 AM1/21/20
to OpenSceneGraph Users
How far have you got?  What problems do you have?

Ravi

unread,
Jan 22, 2020, 12:12:31 AM1/22/20
to OpenSceneGraph Users
We have got the camera panning by calculating the resultant of two vectors(previous vector before panning and changed vector after panning) and compared its magnitude with a value to restrict its position in camera view. But when we zoom in and zoom out the magnitude of the vector that geometry can cover side by side changes and hence the hardcoded value is of no help to us anymore.

Robert Osfield

unread,
Jan 23, 2020, 3:48:51 AM1/23/20
to OpenSceneGraph Users

On Wednesday, 22 January 2020 05:12:31 UTC, Ravi wrote:
We have got the camera panning by calculating the resultant of two vectors(previous vector before panning and changed vector after panning) and compared its magnitude with a value to restrict its position in camera view. But when we zoom in and zoom out the magnitude of the vector that geometry can cover side by side changes and hence the hardcoded value is of no help to us anymore.

I'm afraid this is pretty meaningless out of context, I can't work out what you are doing let alone what you might be doing wrong, or what understanding is missing for you.

Do you have code that you can post that illustrates what you are doing?


 
Reply all
Reply to author
Forward
0 new messages