1 (edited by HondaDirtBiker 2007-02-09 21:05:26)

Topic: Loading IAnimateMeshMS3D and Irrlicht.Addons

I've been having trouble loading an MS3D Model as an IAnimatedMeshMS3D.
When I load my MS3D mesh as an IAnimatedMeshMS3D, I get an error about not being able to convert IAnimatedMesh to IAnimatedMeshMS3D.
On the irrlicht forums I was told I may need to cast IAnimatedMeshMS3D.

Local Mesh:IAnimatedMeshMS3D = Scene.getMesh( "Mesh.ms3d" )
Global Node:IAnimatedMeshSceneNode = Scene.addAnimatedMeshSceneNode( Mesh )

Scene.addCubeSceneNode( 1, Null, Null, Node.getMS3DJointNode( Mesh.getJointName( 0 )).getAbsolutePosition())

Also this is unrelated, but the Irrlicht.Addons mod returns an error. I installed it in irrlicht.mod, then BMax says "Type 'Tirr_IUnknown' not found".

Re: Loading IAnimateMeshMS3D and Irrlicht.Addons

greetings smile  Scene.getMesh() does return an instance of IAnimatedMeshMS3D but cast down to an IAnimatedMesh to match the interface.    to get your code to work you should just have to cast it back before you try to store it:

Local Mesh:IAnimatedMeshMS3D = IAnimatedMeshMS3D(Scene.getMesh( "Mesh.ms3d" ))

as for the Tirr_IUnknown...  to fix that you will need to download the latest release of the mod.  at some point BRL added their own IUnknown and it start giving the mod fits so i had to go back to a different naming convention for that type.

3 (edited by HondaDirtBiker 2007-02-11 00:44:06)

Re: Loading IAnimateMeshMS3D and Irrlicht.Addons

Thank you that worked perfectly. I hope I can show more of my game soon.
Also great work with the addons mod. I enjoy using it.