Gun's position relative to the parent ship is 0,0,0. So it's located right on the center pivot.
===DEBUG===
EntityX(gun) = 0
EntityY(gun) = 0
EntityZ(gun) = 0
EntityX(gun, true) = Current global X of the parent ship is.
EntityY(gun,true) = same for Y
etc.
Perhaps if I gave it its own pivot it could have local co-ords different than the global co-ords of the parent?
It's very frustrating because looking at the mak sample code, what everyone has suggested should work.
I do the same thing.
p\entity is the ship's handle.
gun is the name of the child (e.g. "left_gun")
b\sprite is the sprite graphic of my bullet type
But that doesn't work.
The co-ords of gun on my model are the same as the parent.
The co-ords for flare on the mak model are different than the parent.
Thus, using PositionEntity with the True global flag set does not help. Gun's local co-ords are 0,0,0.
So that seems to be the root of the problem.
My model is faulty. The gun child's local co-ords are 0,0,0. This should not be.
If I import the mak model into Anim8or, change nothing, save it, and export it back into the mak sample folder. The flare is no longer properly positioned at the eye child's position. eye's local co-ords become 0,0,0.
Here it is visually


Before I did this, eye's local co-ords actually gave the true local position from mak's main pivot.
So I am more certain than ever that this is Anim8or issue. What do you guys use to model?
===DEBUG===
EntityX(gun) = 0
EntityY(gun) = 0
EntityZ(gun) = 0
EntityX(gun, true) = Current global X of the parent ship is.
EntityY(gun,true) = same for Y
etc.
Perhaps if I gave it its own pivot it could have local co-ords different than the global co-ords of the parent?
It's very frustrating because looking at the mak sample code, what everyone has suggested should work.
mak=LoadAnimMesh( "mak_running.3ds" ) eyepos=FindChild(mak,"eye") eyeflare=CopyEntity(flare,eyepos)
I do the same thing.
p\entity is the ship's handle.
gun is the name of the child (e.g. "left_gun")
b\sprite is the sprite graphic of my bullet type
weapon = FindChild(p\entity, gun) b\sprite=CopyEntity( bullet_sprite, weapon )
But that doesn't work.
The co-ords of gun on my model are the same as the parent.
The co-ords for flare on the mak model are different than the parent.
Thus, using PositionEntity with the True global flag set does not help. Gun's local co-ords are 0,0,0.
So that seems to be the root of the problem.
My model is faulty. The gun child's local co-ords are 0,0,0. This should not be.
If I import the mak model into Anim8or, change nothing, save it, and export it back into the mak sample folder. The flare is no longer properly positioned at the eye child's position. eye's local co-ords become 0,0,0.
Here it is visually
Before I did this, eye's local co-ords actually gave the true local position from mak's main pivot.
So I am more certain than ever that this is Anim8or issue. What do you guys use to model?