find child and positioning problems
Blitz3D Forums/Blitz3D Beginners Area/find child and positioning problems
| ||
i am having problems with the children. So here it is. i have a modle with vertices and ploygons and all that stuff, then i create this bone that i call control because you know i what to be able to move the entier modle just by moveing this bone. so i have this mesh and this bone and i attach all the vertices of the mesh to the bone and save. by the way its a mesh of a Helicopter. now then, i select the control mesh and attach a bone to it wich i cal machine gun, because its going to control the machine gun, and attach it to the vertices that make up the machine gun. i then select the control mesh again and add four more bones to it called missile 1 and so on. these ones i wont attach to any vertices because i want to use it for positioning. So thats the mesh done now for the main problem. i save it and export it as .b3d and then do the following to load it global Chopper = loadanimmesh("Chopper.b3d") global Chopper_Control = findchild(Chopper, "Control") global Chopper_MachineGun = findchild(Chopper, "Machine Gun") global Chopper_Missile1 = findchild(Chopper, "Missile 1") ... global Chopper_Missile4 = findchild(Chopper, "Missile 4") so that loads it all fine and then when you press a key to move the control fowerd if keydown(200) then Moveentity Chopper_Control, 0, 0, 1 endif and it moves it fowred fine. it when i try and position the camera behind it i get the problem. positionentity camera, entityx(Chopper_Control), entityy(Chopper_Control), entityz(Chopper_Control) moveentity Camera, 0, 0, -100 when i do this it only moves the camera forwed a small amount not relitve to when the mesh is. Help??????? |
| ||
positionentity camera, entityx(Chopper_Control,1), entityy(Chopper_Control,1), entityz(Chopper_Control,1),1 moveentity Camera, 0, 0, -100,1 Guarantees its movement and placement to be global. |
| ||
thx |