Help needed on Transform3D and the view plane.

Hia guys.

Im a Java3d noob that needs some help please.

What Im doing is a space game. I have rendered all the objects I want in space no problems (stations, asteroids and **** like that). I have managed to make my view rotate as I want it (pitch, yaw and roll).

vChgT3d =new Transform3D();

vSteerTG.getTransform(vT3d);

vChgT3d.set(new Quat4d(pitchRate,yawRate,currentRoll,1));

vT3d.mul(vChgT3d);

vSteerTG.setTransform(vT3d);

This works fine. The pitch yaw and roll behavior is just as I want it.

Now Im trying to create the ship movement, of my ship.

I have calculated the change in vx, vz and vz. Or rather change in locations on the x y and z axis.

I dont want to mul this to the transform as I just wana move the ammount of units that the newtonic calculations have determind. So what I *think* I wana do for this is.

vChgT3d =new Transform3D();

vSteerTG.getTransform(vT3d);

vChgT3d.set(new Vector3d(vx,vy,vz));

vT3d.add(vChgT3d);

vSteerTG.setTransform(vT3d);

Though this gives me an exception. On the last line of the code where I set the transform to the transform group.

javax.media.j3d.BadTransformException: TransformGroup: non-affine transform

Anyone know what Im doing wrong?

Thanks in advance.

Tex.

[1487 byte] By [trihaa] at [2007-9-29 1:15:26]
# 1
Ohh I might wana add that this is first person view. So the vSteerTG is the TransformGroup on the ViewPlatform of the simpleuniverseViewingPlatform vp = su.getViewingPlatform();vSteerTG = vp.getViewPlatformTransform();
trihaa at 2007-7-13 3:38:33 > top of Java-index,Other Topics,Java Game Development...