Walk through walls

ricardo_arango

06-02-2006 19:50:11

I crated a mesh in 3DS max, exported it with the 3ds exporter and converted it with the command tools.

I imported the mesh in my app, and set it as a tree collision. My character (ellipsoid) has no problem walking on top of the mesh, but the mesh has walls, and if I go really fast it walks through them.

Also, how do I stop de character from spinning when it hits a wall?

Thanks Mr. walaber for all the replies and the addon.

walaber

06-02-2006 22:01:39

how fast is really fast? yuo can try turning on continuouscollision() for the player, that should help prevent tunneling through walls.

as for spinning, apply torque to the character body to keep it facing the right direction, or remove friction between the character and the walls.

ricardo_arango

07-02-2006 00:04:25

How do I remove the friction between the caracter and the walls?

ricardo_arango

07-02-2006 00:18:25

Continuos collision did it for walls.

For some reason my character kept going through walls. Does the width of the walls in relation to the size of the World have anything to do with the collisions? Because I wasn't moving it that fast... as fast as the character in GTA when runnning i think.

walaber

07-02-2006 00:52:22

it depends on a lot of things. TreeCollision objects have no "thickness" so it's easy to penetrate them, especially if you are updating Newton with a framerate that is low... for example moving pretty quickly with physics updating at 30fps, etc.

ricardo_arango

07-02-2006 01:39:06

So, it would be best I suppose, to update the physics, when a frame is going to be rendered and then rendering FPS = physics FPS.

Can it be done? manually updating the Ogrenewt world in startframe, overriding the listener?

pfo

07-02-2006 20:58:38

Word of advice: a bad mass matrix (i.e. inertia) can cause you to penetrate surfaces with relative ease. Doublecheck that your value is appropriate.

haffax

08-02-2006 18:05:37

This is so one of the most common errors indeed. Definitly a wrong inertia. Always make sure the inertia is set to something plausible.