btUprightConstraint question/problem

RJNelson68
Posts: 73
Joined: Tue Oct 06, 2009 3:19 pm

btUprightConstraint question/problem

Post by RJNelson68 »

I've been trying to use a btUprightConstraint in my project. I am using Torque 3D game engine with Bullet Physics integrated. I can use all of the other types of constraints with the usual code such as:

btGeneric6DofConstraint* dof6joint = new btGeneric6DofConstraint(*body1, *body2, localA, localB,true);

And it works flawlessly. However, when using the same kind of thing for the btUprightConstraint as follows:

btUprightConstraint* newUpright = new btUprightConstraint( *m_chassis, uprightTrans );

I get errors that state I cannot instantiate an abstract class. I'm sure I have my include working properly as my header file recognizes it as a class, and other than instantiating the class, I can call to its public functions to set the internal values.

I'm a bit confused as they are all from the btTypedConstraint class. Can someone help me?
RJNelson68
Posts: 73
Joined: Tue Oct 06, 2009 3:19 pm

Re: btUprightConstraint question/problem

Post by RJNelson68 »

I figured it out, I guess I should have thought about it for a second. That's what happens when you code at 4 am.
RJNelson68
Posts: 73
Joined: Tue Oct 06, 2009 3:19 pm

Re: btUprightConstraint question/problem

Post by RJNelson68 »

Well on an annoying note, after getting all of the virtual functions added and it compiling properly, it hangs when running. I was trying to use it on a hovercraft to keep it stable.

I don't suppose anyone has this this working with the latest build?
RJNelson68
Posts: 73
Joined: Tue Oct 06, 2009 3:19 pm

Re: btUprightConstraint question/problem

Post by RJNelson68 »

Disregard my previous post, I made a programming error in a part of the code designed to pass the variables to the uprightConstraint.

The uprightConstraint code itself is just fine.........these are not the droids you are looking for!
RJNelson68
Posts: 73
Joined: Tue Oct 06, 2009 3:19 pm

Re: btUprightConstraint question/problem

Post by RJNelson68 »

OK I'm pretty confused here. I've tried the btUprightConstraint and it compiles and all things look as if they should work, but they don't. The hovercraft can be sent into a spin as easy as pie.

So I tried this guy's approach since he said it worked for them: http://www.bulletphysics.org/Bullet/php ... 494#p19494

That would also fails to stabilize my hovercraft.

I've even tried a four-point pulse system, that...was bad.

I could really use a bone being thrown in my direction please. Thanks in advance.

I think the last thing I have is to program in an angular damping spring system on my own, but I had kind of hoped the physics engine would have had something in place already. I'm not big on reinventing the wheel.