Dead Mesh
Blitz3D Forums/Blitz3D Beginners Area/Dead Mesh
| ||
Whenever I load a mesh into the game, it places itself on the map before I set it's coordinates. Basically, it creates an extra dead mesh that does nothing. Even though I use the mesh (that I loaded) afterwards, I don't know how to get rid of the dead clone. Do you know what I'm talking about? |
| ||
hide the mesh with hideentity |
| ||
FreeEntity |
| ||
>Do you know what I'm talking about? No! Andy |
| ||
Not sure what you mean but are you using copyentity/mesh to position new clones and you then want to delete the original mesh? If so use FreeEntity like Wolron said, if not then I don't know what you are talking about either ;) |
| ||
Whenever I load a mesh, it's automatically placed/spawned. I then start using it for whatever purposes I need, but there's still the dead clone that spawned earlier. If you still don't know what I'm talking about, then thanks anyway. |
| ||
Could you post some code or something? It sounds like you are creating two meshes when you only want one. |
| ||
It has happened in more than 1 program. I'll just mess around more and see if I can fix it. Seems like no one else has had this problem... Update: I did some tests and found out it happens as soon as I first load the mesh. |
| ||
Post some code. |
| ||
When you load a mesh, it's positioned at coordinate 0,0,0 by default. There should be only ONE mesh, no clones. If there is more than one Mesh right after loading one mesh, then there's something wrong with your setup. I never heard of such a bug so far. I doubt it's your drivers, but you could try to update your graphics card drivers. Make sure you are not cloning the mesh somewhere, eg. by using copymesh, copyentity, or by using LoadMEsh in a Loop, twice etc. Make a simple failsafe miniapp like this: graphics3d 640,480,32,2 setbuffer backbuffer() camera=createcamera() translateentity camera,0,0,-10 mesh=loadmesh("mymesh.3ds) translateentity mesh,2,0,0 renderworld() flip waitkey() Now, do you see one or two meshes? |
| ||
I usually load a mesh and then position it somewhere with "PositionEntity". I'll try your code later JKF, when I have the chance. Thanks. Update: I just relized something. This whole time I've been using "PositionEntity" to move mesh's and stuff around. Should I really be using "TranslateEntity"? |
| ||
One is relative, the other absolute. Personal preference. |
| ||
i am experiencing the same problem. i've added a hudcam, and now my code suffers from this "dead mesh" at 0,0,0. i'll go deeper to find out why. |
| ||
my solution for this problem: hide hud-elements, disable hudcam, enable normalcam, renderworld then hide level, show hud-elements, enable hudcam, disable normalcam, renderworld then flip - et voila the "dead mesh" is gone. |
| ||
of course when you render with two cameras, you may get "dead" meshes, although I guess this has nothing to do with the mesh, but only with the camera. having multiple cameras rednering the same CameraViewPort doesn't make much sense. CameraProjMode is the official command to activate/deactivate cameras. |
| ||
i did deactivate the camera, but i didn't hide the hud-elements for the first render pass..... |
| ||
It's a pity Blitz3D doesn't have a CreateWorld() command so that we could place different objects in separate worlds, and render as required. It would save all this hide/show malarkey. :) |