Tokamak again... :cry:

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
bappy
Posts: 63
Joined: Fri Dec 12, 2003 10:49 am
Location: france
Contact:

Tokamak again... :cry:

Post by bappy »

i would like to know if someone have integrated tokamak with successfull.
i have seen that powerpop have make an object to manage tokamak object but he said he have some problem about the irr position offset.
have you find solution, can you tell me what you have done, what are your problem , i m working on tokamak object for a mesh editor and having the same problem.

i have a theory, dont know if it s good.
i have seen some problem from loading a 3ds mesh to irr(maybe a bug dont know, could be cool if niko can say more about pivot point in irr), because in max when you set the pivot point somewhere, irr does nt care about it in the Y axis(Zfor max).
for irr, the pivot point is always at the base of the bounding box of the mesh
i will try to show you in a textdraw:
it a 2*2box from left side view

_______________ x=2 ;Y=2
| |
| |
| x=1 Y;=1 |
| * |
| Max Pivot |
| Point |
|_______________| x=2 ;Y=0;
and in irr:

_______________ x=2 ;Y=2
| |
| |
| |
| |
| irr Pivot |
| Point |
|_______*_______| x=2 ;Y=0;
x=1; y=0;

and in tokamak, the pivot point seems to be at the center of the bounding box.
But i have seen that you can specifie an offset for the geometrie by caling something like this in tok:
geom->setposition(veV3);
so you can call
geom->setposition(meshnode.x,meshnode.Y-((maxedge.y-minedge.y)/2),meshnode.z);
to decall downside from the height/2 of the box to decal down the pivot point.

Powerpop, have you work on that etc..
have someone another solution?
-----------------------------
Sans danger, pas de gloire...
http;//bappy.free.fr
-----------------------------
bappy
Posts: 63
Joined: Fri Dec 12, 2003 10:49 am
Location: france
Contact:

Post by bappy »

forum have crash my beautyfull draw :cry:
-----------------------------
Sans danger, pas de gloire...
http;//bappy.free.fr
-----------------------------
Post Reply