Java3D viewer coords ?

Hi,

I am making an interactive walk though of my university campus and was wondering…

In my program I create a Canvas3D and then add building objects to it and move them to their correct locations using Transform3D. This is done only once at the start.

I have a problem in getting the actual x,y coords of where the scene is being viewed from. I want a function like viewPlatform.getX() or something so I can find out where the virtual viewer is stood in the world. I will be using this to decide which building is closest.

The view starts out at 0,0 i assume… but because you can move using the mouse the coords will change. What I need is to be able to find them out at any time.

Any ideas ?

Thanks

Chris

Look at docs for the ViewingPlatform object, specifically the getViewPlatformTransform method.