getMatrixOfJoint problem for .X Files

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

getMatrixOfJoint problem for .X Files

Post by dhenton9000 »

Electron posted a fix for getMatrixofJoint for x files in the following post:


http://irrlicht.sourceforge.net/phpBB2/ ... oint#21523


I ran into the same problem, used his fix, and got it to work:

Image

The particles are attached to the jaw joint of the dragon, without his fix, they end up on the chest.

His post is part of FAQs but I thought it should be in the bug listing.

Here's the change that Electron made to CXAnimationPlayer, thus requiring a recompile:

Code: Select all


//! Returns a pointer to a transformation matrix
core::matrix4* CXAnimationPlayer::getMatrixOfJoint(s32 jointNumber, s32 frame)
{
	if (jointNumber < 0 || jointNumber >= (s32)Joints.size())
		return 0;

//	remove  this --> return // &Joints[jointNumber].CombinedAnimationMatrix;
	return &Joints[jointNumber].AnimatedMatrix; //replace with this
}

Source code and model from above available for testing. Send an email to dhenton[at]users[dot]sourceforge[dot]net.


It would really be cool if this could go into some next version of Irrlicht, I hate maintaining a separate code base, somehow, I don't think I can do it quite as well as Niko can :wink:
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Thanks for posing, I'll include it into the next version.
Guest

Post by Guest »

optionally you should also add an option so that "this->getMesh(frame)" is called so the "frame" parameter is taken into account
Guest

Post by Guest »

Thanks for posing...
Whoa! So THAT"S what dhenton9000 looks like... :shock:

lol
Post Reply