loadanimmesh and camerapick imcopatibles?
Blitz3D Forums/Blitz3D Beginners Area/loadanimmesh and camerapick imcopatibles?
| ||
loadanimmesh and camerapick arent copatible this code fails if use loadanimesh, but i use loadmesh is ok ; Code Graphics3D 640,480 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,20,-100 light=CreateLight() RotateEntity light,90,0,0 robot=LoadMesh("media/makbot/mak_robotic.3ds") EntityPickMode robot,2 MoveEntity robot,-20,0,0 robot1=LoadAnimMesh("media/makbot/mak_robotic.3ds") EntityPickMode robot1,2 MoveEntity robot1,20,0,0 Animate robot1,2 While Not KeyDown(1) CameraPick camera, MouseX(), MouseY() UpdateWorld RenderWorld Text 0,0,PickedX() Flip Wend End |
| ||
more bugs, if i use loadanimmesh and before get size of mesh (meshwidth, meshheight or meshdepth) is no correct, the values are infinite :) no copymesh with loadanimmesh too |
| ||
try using a different file format x or b3d |
| ||
on loadanimmesh you need to pick a part of the model ie the head, arms or torso etc as they are seperate parts. |
| ||
this too fails sinu and other file formats too ; Code Graphics3D 640,480 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,20,-100 light=CreateLight() RotateEntity light,90,0,0 robot=LoadMesh("mak_robotic.x") EntityPickMode robot,2 MoveEntity robot,-20,0,0 robot1=LoadAnimMesh("mak_robotic.x") ; All picks EntityPickMode robot1,2 For n = 1 To CountChildren(robot1) EntityPickMode GetChild(robot1,n),2 Next MoveEntity robot1,20,0,0 Animate robot1,2 While Not KeyDown(1) CameraPick camera, MouseX(), MouseY() UpdateWorld RenderWorld Text 0,0,PickedX() Flip Wend End |
| ||
i have a one solution but and other problem, camera pick by radius or box, but i down kown mesh size the mesh size is -200000 |
| ||
You need to step through the models hierarchy...Graphics3D 640, 480 camera=CreateCamera() PositionEntity camera,0,20,-100 light=CreateLight() RotateEntity light,90,0,0 robot=LoadMesh("mak_robotic.3DS") EntityPickMode robot,2 MoveEntity robot,-20,0,0 robot1=LoadAnimMesh("mak_robotic.3DS") EntityPickModeR(robot1, 2) MoveEntity robot1,20,0,0 Animate robot1,2 While Not KeyDown(1) mx = MouseX() my = MouseY() CameraPick camera, mx, my UpdateWorld RenderWorld Text 0,0,PickedX() + " : " + PickedY() Plot mx, my Flip Wend End Function EntityPickModeR(ent, mode, obsc=1) Local c EntityPickMode ent, mode, obsc For c=1 To CountChildren(ent) EntityPickModeR(GetChild(ent, c), mode, obsc) Next End Function YAN |
| ||
yeppp!! very thanks :) i now include animations in entityeditor |