I am having trouble getting an MS3D Model to load 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.
Could the problem be the model or the code?
Trouble With MS3D Model
-
- Posts: 20
- Joined: Sun Aug 27, 2006 9:10 pm
- Location: U.S.A.
- Contact:
Yes, a type cast will do the trick...
But you don't need to load it as an IAnimatedMeshMS3D, you can use an IAnimatedMesh and Irrlicht should handle it as an MS3D mesh automatically...
But you don't need to load it as an IAnimatedMeshMS3D, you can use an IAnimatedMesh and Irrlicht should handle it as an MS3D mesh automatically...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
getJointCount() / getMatrixOfJoint() or similar, which is why we really, really, really, really need to move the skeleton/animation system to IAnimatedMesh or a new interface, and get rid of the file-format-specific APIs altogether to stop this evil before it spreads any further.Luke wrote:It would be your code,
you need to cast to IAnimatedMeshMS3D if you want the MS3d interface, but I can't see why you need it.
Code: Select all
IAnimatedMesh * shipMesh = smgr->getMesh("z1.ms3d");
if(shipMesh && shipMesh->getMeshType() == EAMT_MS3D)
{
IAnimatedMeshMS3D * actualMesh = static_cast<IAnimatedMeshMS3D*>(shipMesh);
for(int joint = 0; joint < actualMesh->getJointCount(); ++joint)
{
matrix4 * matrix = actualMesh->getMatrixOfJoint(joint, 0);
....
}
}
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way