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
|