powered hinge problem


23-08-2010 12:08:11

Hi all,

I have a weird problem, i have 2 hinge joints that I want to power separately, simplified code:

leftJoint.WorldUpdated += new EventHandler(leftJoint_WorldUpdated);
rightJoint.WorldUpdated += new EventHandler(rightJoint_WorldUpdated);

void leftJoint_WorldUpdated(object sender, EventArgs e)
MogreNewt.BasicJoints.Hinge hinge = (MogreNewt.BasicJoints.Hinge)sender;

void rightJoint_WorldUpdated(object sender, EventArgs e)
MogreNewt.BasicJoints.Hinge hinge2 = (MogreNewt.BasicJoints.Hinge)sender;

The strange part is togheter they don't work, but if I comment one out (for instance //leftJoint.WorldUpdated += new EventHandler(leftJoint_WorldUpdated);) it works,
It also works if I use constants instead of forceLeft and forceRight, but I need those variables to give different values depending on the user input.

Anyone has an idea of the cause?


17-09-2010 10:12:44

Unfortunately nobody has wrote answer.
I wrote a note to the MogreNewt 2.0 thread and asked the followers to look to this post. Maybe somebody knows an answer, but didn't see this topic.
You should add the word MogreNewt to your topic title, when you post in the Mogre forum. So I think there is a better chance that the right people read it.

Maybe you could also ask again at a different place:

When you need information how to do something with Newton or if you have problems by using Newton I would suggest this:

* For general questions (how Newton works, its logic, etc.) you find good help in the external Newton forum.

* For questions how to do something in interaction with Ogre (and Mogre), you can use the OgreNewt section of the Ogre Add-ons forum. There is a better chance to get an answer, because there are much more users who know to handle with Newton. Here in the Mogre section are not so much people with Newton knowledge (because C++ Ogre is more common).

* For Mogre and MogreNewt specific questions the Mogre section of this forum is a good place. Just create a new topic (your topic title should include the word MogreNewt).

A good help could also be:

* Newton wiki
* Newton API description - seems to be only related to Newton 1.x, but most functions are similar