[osg-users] Custom camera manipulator

Robert Osfield robert.osfield at gmail.com
Thu Jan 5 01:28:49 PST 2017


Hi Joe,

On 28 December 2016 at 08:24, Joe Kindle <seganom at gmail.com> wrote:
> I'm building a terrain viewer. Using the "Terrain Manipulator" as the camera Manipulator works fine, except that the movement with the middle mouse key 'sticks' to the ground (by the height) which makes little jumps when I.move
> How can I solve that jumps.?

You'll need to write your own manipulator, either by subclassing from
TerrainManipulator or from the base class.  The source code for
TerrainManipulator is all out there so can serve as an example of how
to go about the task.

How to solve the jumps?  That all depends upon what might be causing
the jumps, how large jumps are, how you want things to behave, it's
rather open ended as to what you are after so giving you an a single
answer isn't possible.

I presume the "jumps" are caused by steps in terrain, such that when
you go over cliffs or hit buildings in your terrain?  If the later
then perhaps setting the intersection traversal mask up to just test
terrain would solve this problem.  This approach would require you to
set node masks on your different scene graph elements so that terrain
and cultural data are treated differently.



More information about the osg-users mailing list