I'm having the same problem when I try to make a collision
system.
When a collision occurs, I try to get the normal and move along the
normal.
I use PickIntersection.getPointNormal(), and I get a null exception.
I'm currently trying to return normal and color information from picking
shapes in my scene.
I have created shapes with full color and normal information. I have no
problems enquiring geometry information but when i attempt to find color and
normal info from shapes i get null responses.
The code i'm using to set up my pick canvas is :
pickCanvas = new PickCanvas(canvas3D,
shapeGroup);
pickCanvas.setTolerance(4.0f);
pickCanvas.setMode(PickCanvas.GEOMETRY_INTERSECT_INFO);
to get geometry info im using :
pickCanvas = new PickCanvas(canvas3D,
shapeGroup);
pickCanvas.setTolerance(4.0f);
pickCanvas.setMode(PickCanvas.GEOMETRY_INTERSECT_INFO);
i've get pick tool capabilities when creating my shapes using :
PickTool.setCapabilities(theCube, PickTool.INTERSECT_FULL);
I've set all the capability bits for the shape and geometry.
To find the color/normal picked im using:
Vector3f normal = pi.getPointNormal();
System.out.println("NORMAL VIA
PI METHOD="+normal);
It says in the Java3D docs that you get a null response if there is no
color or normal info (but i have included this) or if the pick tool
capabilities are not properly set.
Does any one know why i get a 'null' response?
Thanks in advance,
Darren Cosker
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of
the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message
"help".