Setting the viewplatform() correctly to hopefully catch a collision

Hi there,
I’m trying to get a collision to work between two externally loaded geom’s (A green pad and a Mag wheel check images). I’m trying to create a bounds for each shape and then when they collide my behavior function wants to System.out.print something.

http://img206.imageshack.us/img206/8773/pad1pm3.th.jpg


http://img214.imageshack.us/img214/3060/pad2dv3.th.jpg

I read JK’s 3D tutorial and he suggested using bounds so I’ve been trying to get my head around how to set up my ViewingPlatform branch to successfully manage a collision. Setting up activation radius as such for the ViewingPlatform.

I can’t get my ViewingPlatform to get its bounds set (I already checked the Capability bits).

u is SimpleUniverse

	vp.equals(u.getViewingPlatform());
	    vp.setPlatformGeometry( pg );
//		vp.setBoundsAutoCompute(false);
		vppbounds.setRadius(50.0);  //Bounds 
		vppbounds.setCenter(new Point3d(0.0, 0.0, 0.0));
/* many different types of bounds boundbox, boundsphere, bound polytope */
		vp.setViewPlatform(viewp);	

viewingplatform bounds activation radius:Center=(0.0, 0.0, 0.0)  Radius=-1.0
viewplatform bounds activation radius:Center=(0.0, 0.0, 0.0)  Radius=50.0

I can set my ViewPlatform but not ViewingPlatform … what am I missing?

If you are trying to do collision avoidance, stop now.

J3D collision detection is asynchronous, it can tell you a collision happened at some point in the past but you wont get notified on the frame it happened

Google J3D and “Collision Avoidance” for more information

You also might want tpo try askign further J3D questions in the Java3D forum here at JGO.