Problem with Tokamak

Blitz3D Forums/Blitz3D Userlibs/Problem with Tokamak

Andres(Posted 2006) [#1]
Could anyone help we with a little problem in my Tokamak engine, please.

Why doesn't player stand still? Is Tokamak too inaccurate or the problem is in the code?

http://www.oat.ee/andres/TokaEng.rar

Thanks in advance.


Sweenie(Posted 2006) [#2]
It's this line...
SetEntityAngles(CameraPivot, 0, EntityYaw(Camera), 0)

Your are setting the camerabody's angular momentum to a value based on the camera yaw.
Just comment out that line and the camera will stay still.


Andres(Posted 2006) [#3]
Why the boxes will stay still in non correct angle?


Sweenie(Posted 2006) [#4]
There is something wrong with the InertiaTensors that you are setting.
Try commenting out the line there you set the tensor and you will see that the boxes and spheres will behave alot better(currently they rotate a bit weird)
Are you sure that the correct tensors are set?, Sphere for sphere and box for box?

Also, you don't need to call Updateworld, and Captureworld is only used when rendering with tweening which you don't so you can skip that too.


Andres(Posted 2006) [#5]
ok, i've fixed that problem.