Model Child info
Blitz3D Forums/Blitz3D Programming/Model Child info
| ||
I wanted to make a particle effect following a child of the model but I can't get the model childs position or rotation... What can I do? Graphics3D 1024,768,32,2 entity = LoadAnimMesh(add mesh) For x=1 To CountChildren(Entity) TempEntity=GetChild(Entity,x) TempAnim=ExtractAnimSeq(TempEntity,0,10) Animate(TempEntity,1,0.3,TempAnim) Next c=CreateCamera() PositionEntity c,0,0,-100 While(Not(KeyHit(1))) Cls UpdateWorld() RenderWorld() For x=1 To CountChildren(Entity) TempEntity=GetChild(Entity,x) Text 1,x*12,"x "+EntityX(TempEntity,True)+" y "+EntityY(TempEntity,True)+" z "+EntityZ(TempEntity,True) Next Flip() Wend |
| ||
If you're trying to do what I think you are, this is a known problem with blitz. Animated meshes return info as if static. This may help if you can use them and if they're still accurate: translated (ru->en) http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=ru&tl=en&u=http://blitz.pp.ru/forum/showthread.php%3Fs%3D969a613d7deeb67f32385669ba81bcbb%26threadid%3D203%26perpage%3D15%26highlight%3D%26pagenumber%3D1&prev=_t&rurl=translate.google.com&usg=ALkJrhgFEE4PoiLUk8jkxkY1WW799-CyrA untranslated http://blitz.pp.ru/forum/showthread.php?s=2a85d3d02c25434f31dae3da25e1ca6e&threadid=203 |
| ||
couldn't understand shit... |
| ||
It seems like the common problem. You will need to loop through each vertex of the mesh and find the centre point. Store this number, then use the fitmesh command to centre your mesh around the world 0,0,0. Then, use the position entity command along with the centre co-ords. This will move the entity back to it's original location, restoring the entity position. You could also just store the entity position, rotation and scale in each mesh name in your modeller application, and parse each entities name upon loading into blitz. |
| ||
try this. I assume you have a rigged, animated model- I don't. |
| ||
Hmmm, if it were a rigged animation, you would be searching for bones. Can you clarify what type of animated model you have? |
| ||
Mr. Slat please don't ask the same question in multiple sections of the forum, people really don't like that. I answered your question here: http://www.blitzbasic.com/Community/posts.php?topic=89089 Not sure if you have seen it. |
| ||
uoou sory haven't been here for awhile now. My model is B3d model. Has multiple models, for instance body/head/hair, so I have extract each model animation. That won't work its like it returns static... |