Hi,
Here's the link: http://www.kingsware.de/j3d/gamerot.zip
I have a new problem. I update only the x- and y-rotation of my ship every
Frame. It sets the rotation by looking at the Mouse position. But my ship
rotates over all axis x,y AND z, but not at the same time!!! It looks like
Java3D decides, which are the x and y axis from the viewplatforms point of
view!! Is that right?
How can I set a "local"-Rotation, which rotates the local axis not
the "viewed" one
I had the same problem, only the other way around, with Translation. The ship
moved on the global axis instead of flying, depending on the ships current
rotation.
I fixed this problem like this(not exactly):
Code:
//Position
Vector3f position = new Vector3f(x,y,z);
Transform3D posTrans = new Transform3D();
//Rotation
Transform3D rotX3d = new Transform3D();
Transform3D rotY3d = new Transform3D();
Transform3D rotXY3d = new Transform3D();
//change the XY-Rotation (with MouseAngle)
rotX3d.rotX(xAngle);
rotY3d.rotY(yAngle);
rotXY3d.mul(rotX3d, rotY3d);
//The solution! now the positiontranslation is local!
rotXY3d.transform(position);
posTrans.set(position);
|
|
Is there any possibility to do this with rotation. There must be the
possibility to rotate over the local axis!
I've read something
about the following function:
Code:
view.getLocalToVWorld(Transform3D trans)
|
|
Is this a possibility? Anyone fixed this problem, yet
Greets and thanks, Juan
===========================================================================
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".