help with getchild, counchildren

BlitzMax Forums/MiniB3D Module/help with getchild, counchildren

RifRaf(Posted 2013) [#1]
Hey guys,I have a 3DS files that has grouped items in it.. I can load this in B3D with loadanimmesh and it is all ok.

heres the bmax test code that is giving me issues
CH is reporting 0 children, I know this is untrue in the model itself, if I force a number in the getchild value it shoots an error.
Is there a known issue with 3DS meshes and MiniB3D?
I suppose I can convert them but its not a bones animation its just grouped (its a buggy with 4 grouped wheels)
Import sidesign.minib3d
Graphics3D 1200, 600, 0, 2
Local l
l=CreateLight()
Local model:Tmesh


'create camera
cam = CreateCamera()
MoveEntity cam, 0, 11, -11
CameraClsColor cam, 20, 90, 155
model=LoadAnimMesh("buggymax.3ds") 
DebugLog CountChildren(model)
EntityShininess model,1
RotateMesh model, -90,0,0
tex=LoadTexture("buggy_t_05.jpg")
EntityTexture model,tex
PointEntity cam,model
PositionEntity model,0,0,0
ch=CountChildren(model)
DebugLog "amount of children is "+ch
Repeat
	TurnEntity model,0,.25,0
    For i=1 To 2
      c=GetChild(model,i)
      TurnEntity c,0,2,0
    Next
	UpdateWorld 'platform collisions
	RenderWorld
	Flip
Until KeyHit(27)
End




RifRaf(Posted 2013) [#2]
oops. double post


Chapman7(Posted 2013) [#3]
MiniB3D only supports .b3d files. I use milkshape to convert to .b3d


RifRaf(Posted 2013) [#4]
Thanks Chap,

I have another question too. Now that I can get the grouped b3d car loaded with loadanimesh() When I try to spin a wheel child via turnentity 1,0,0

regardless of the global flag on the command, it spins around a large axis instead of its own center.. is this something I can fix in Minib3d ?

Thanks again


RifRaf(Posted 2013) [#5]
nevermind :)