entity's origin

Blitz3D Forums/Blitz3D Beginners Area/entity's origin

yours(Posted 2005) [#1]
Hi.

In my game I have two entities and I want to put one at the other's origin. When I do this, the one is off to the side. My question is how do I set where an entity's origin is at? When I was modeling them, I put them at the center of the axis, but that didn't solve it.


yours(Posted 2005) [#2]
Oh and I am using the FitMesh command, I don't know if that would change anything.


AdrianT(Posted 2005) [#3]
hmmm, In 3ds max at least, you just put your local axis wherever you like in the scene and thats where the object will pivot from. So you could just select your pivoting object, got to the pivot tools and us ethe align tool to align one objects pivot to the other object.


yours(Posted 2005) [#4]
I used Wings3d to do the modeling; I'm not sure if that would have anything thing to do with it.


yours(Posted 2005) [#5]
I took out the FitMesh command on the objects and it worked. Can FitMesh change the origin of an entity?


DJWoodgate(Posted 2005) [#6]
Well not really, it can change the position of the verts with respect to the origin, but same difference I suppose :)


big10p(Posted 2005) [#7]
Yes, you can change a meshes origin using FitMesh.

Basically with FitMesh, you're defining a cube in which the mesh should fit. The x,y,z parameters define where one (any) of this cube's corners should be, relative to the meshes origin. Then, the width,height,depth parameters define the vector (directions) to the opposite corner of the cube.

For example, FitMesh mesh,-1,-1,-1,2,2,2 will make your mesh fit a bounding box of 2x2x2, with origin in the centre.

However, if you do FitMesh mesh,-2,-2,-2,2,2,2 then the mesh will again fit a bounding box of 2x2x2, but the origin will be in one of the corners of the bounding box.

You can even use FitMesh to place the origin outside of the mesh completely, if you so wish.

Well, I think that's right - been a while since I've used FitMesh, tbh. :)


yours(Posted 2005) [#8]
Ohhhhhh that clears everything up. Thank you all for your help.