PDA

View Full Version : Jumping Camera


mchristyuk
07-25-2007, 04:17 PM
Hi all,

Can I first say what a fantastic piece of kit WWJ is!.. I have had great fun programming with it and seeing what is possible.

However I have stumbled across a problem I am struggling to fix.

I have some georeferenced data that to place accuratlely on WWJ I had to edit the Earth radius values back to being elipsodal. My rendering layer now draws my objects perfectly where they should be in the world.

However.. now when I zoom right in on them I hit a problem. When I am almost zoomed right in to ground level on the objects the WWJ camera suddenly jumps right back out by about 10000 metres.. which isn't particularly helpful!.. I've examined the code and am struggling to see what could cause this. It doesn't happen everywhere on the terrain.. only in certain places..

My point of view stays focused on what I was looking at.. however my altitude shoots right up to take me away from the ground.

Any ideas? Could it be getting confused about the terrain height?.. How does it work out where "ground level" is to stop me zooming in under the terrain (I think this may be where the issue lies)?

Many Thanks

Mark

mchristyuk
07-25-2007, 04:32 PM
Typical.. always the way.. you can be staring at a problem for weeks.. then 10 minutes after posting in public you track it down!

Looking in the BasicOrbitView there is some code in doApply() that says this:

this.collisionRadius = this.computeCollisionRadius(this.viewFru stum);

When I reduce the collisionRadius afterwards all is good.. so it looks like the collisionRadius is being a bit conservative (by about 50 metres or so)..

Cheers

Mark