Pivots in .b3d format

Blitz3D Forums/Blitz3D Programming/Pivots in .b3d format

blitzbasico(Posted 2004) [#1]
I have seen that helpers of 3ds max is exported to b3d like pivots. how I can identify those pivots in b3d? It is for knowing its positions
Sorry, I dont know the language well (English)


Ross C(Posted 2004) [#2]
Hey, you could try and use the FindChild command.

Make sure you give the object in 3d max a name, then do:

pivot=FindChild(entity,"pivotname")


where entity is the file you load in, and "pivotname" is what you called the pivot in 3ds Max. You can now use the handle pivot to find it's position :D

x=EntityX(pivot,true)
y=EntityY(pivot,true)
z=EntityZ(pivot,true)



Gabriel(Posted 2004) [#3]
It may be because I'm exporting via Ultimate Unwrap instead of straight to Blitz, but I've found that objects don't report their own position. Regardless of where they are and what they're parented to, every object in the scene returns the same EntityX,Y and Z, even with the global flag set as above.

If you don't notice that problem with the method you use to export, then what Ross suggests is perfect.

If you do notice it, here's what I do instead. I create a 1,1,1 cube *centered* ( important because max defaults to making boxes with the pivot at the base and that'll be wrong ) at the position you want a pivot.

Then in the loading code, I FindChild the object, just as Ross showed above, run a little function to return the average of all the coordinates' x,y and z components and then free the cube.

It's a pretty inelegant solution, but it works.


blitzbasico(Posted 2004) [#4]
thanks!!!