bones is ok this code?

Blitz3D Forums/Blitz3D Beginners Area/bones is ok this code?

Santiworld(Posted 2008) [#1]
hi, i start the test to use vehicles woth bones...

in 3d, i have my bodycar, with 4 whells... connected with bones, assin with names...
in blitz work fine, the whells turn correctly..

but i put here the code, to check...

this is the way to do?

 Graphics3D 1024,768,32,0

	car = LoadAnimMesh ("car.b3d")
	PositionEntity car,0,10,0
	EntityPickMode car,3

	a = FindChild (car, "1")
	b = FindChild (car, "2")
	c = FindChild (car, "3")
	d = FindChild (car, "4")
	torret = FindChild (car,"Box01")

	EntityPickMode a,2
	EntityPickMode b,2
	EntityPickMode c,2
	EntityPickMode d,2
	EntityPickMode torret,2


	cam = CreateCamera()
	PositionEntity cam,20,10,20

	textura = LoadTexture("map.bmp")   ;only texture for tests
	EntityTexture car,textura

While Not KeyHit(1)

	PointEntity cam, car

UpdateWorld
RenderWorld



	TurnEntity car,0,.01,0  ;car

	TurnEntity a,0,10,0     ;whells.. 1 2 3 & 4
	TurnEntity b,0,10,0
	TurnEntity c,0,10,0
	TurnEntity d,0,10,0
	TurnEntity torret,0,.1,0

	Text 0,0, A       ;id of whells, works, fine...
	Text 0,20,B
	Text 0,40,C
	Text	 0,60,D


	id = CameraPick (cam,MouseX(),MouseY())
	Text MouseX(),MouseY()-25, id,1,1       ;show id entity

Flip 0
Wend  



Dreamora(Posted 2008) [#2]
well no, its worthless to do the pickmode on the bones.
pickmodes are only of relevance on geometry


Santiworld(Posted 2008) [#3]
:), yes, i only write the pickmode to test if recon the id when i over with the mouse...


Tab(Posted 2008) [#4]
Latatoy si necesitas ayuda escribeme a mi mail. =)

Saludos.


Ross C(Posted 2008) [#5]
Yeah, that seems ok to me :o)

Make sure your wheels have as little polygons as possible though.


Santiworld(Posted 2008) [#6]
thanks ross C, the tank now have 2000 triangles...
whe whell have 200 polys, and now i go to use LODs..
and i export to d3b, using loadanimesh, and works perfect...

this was very helpfull for me...

the front whells, have a cube to turn in direction, and next i turn the whell to make the moving car efects...