AndroidAdam
22-10-2008 05:11:58
Hi, I'm having a bit of a problem with my player characters (the model that the player controls.)
My problem is with the character "bouncing" too much. While the physics are great for things like wooden barrels and balls, the only thing that I want from my character is to make sure that it doesn't go through walls or the floor.
Here's my code. (sorry it's in C# using MOGRE and MOGREnewt. If it's too much trouble I'll rewrite it in c++)
I'm new to both OGRE and Newton and any help would be appreciated!
My problem is with the character "bouncing" too much. While the physics are great for things like wooden barrels and balls, the only thing that I want from my character is to make sure that it doesn't go through walls or the floor.
Here's my code. (sorry it's in C# using MOGRE and MOGREnewt. If it's too much trouble I'll rewrite it in c++)
Entity steven = sceneMgr.CreateEntity("SteveMain", "Stephen.mesh");
SceneNode steveNode = sceneMgr.RootSceneNode.CreateChildScene();
steveNode.AttachObject(steven);
Collision steveCol = new MogreNewt.CollisionPrimitives.ConvexHull(world, steveNode);
Body steveBody = new Body(world, steveCol);
steveCol.Dispose();
steveBody.IsGravityEnabled = true;
steveBody.AttachToNode(steveNode);
steveBody.SetMassMatrix(mass, Vector3.ZERO);
steveBody.SetPositionOrientation(stevePos, steveOrient);
I'm new to both OGRE and Newton and any help would be appreciated!