Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Ode. How can I make it so that my player can't push through the sides of a triangle mesh?

Author
Message
coolgames
19
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 14th May 2006 07:00
Okay, here's my problem. I've loaded my level, then converted it to a mesh, then I convert the mesh to vertex data. Then I change it back into the object. Then I make my triangle mesh.

I have a player that is a sphere, I use ODE SET LINEAR VELOCITY to move my player. The problem is then when I walk strait against the wall. He can push through it. Is there any settings I can set for the object so that he will not go through the level if he pushes against it? I know it's possible, seeing as fpscreator uses ode for the players collision against the level.

thebulk71
18
Years of Service
User Offline
Joined: 2nd Jan 2006
Location: takin a poop
Posted: 16th May 2006 22:13
hi checkout my ODE FPS example, I have solutioned that problem with a 3d converter called 3Dwin that can be found here http://thebulk.free.fr/3Dwin.zip

checkout this link
http://thebulk.free.fr/ODE_fps.zip

it contains an open source ODEFPS game level and explains how to get the best from ODE, just to give you a quick idea, forget all of that vertex conversion crap, just use 3Dwin to convert an x file into an x file, it sounds dumb but it actually rebuilds a stable triangulated file without 'leeks' (that are the source of your problem). for ODE the best thing to do is have a "3Dwin converted low poly object" for the collision (that will be hidden during gameplay) and a high poly fully textured object for the level visual, this increases framerate and ODE stability!
coolgames
19
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 17th May 2006 16:43 Edited at: 17th May 2006 17:25
How do you convert. Is the converter supposed to have a gui. Or do I have to use a command prompt. I can't seem to make it work.

Also, is there a way so that when your player hits a wall, he won't bounce as much?

thebulk71
18
Years of Service
User Offline
Joined: 2nd Jan 2006
Location: takin a poop
Posted: 20th May 2006 11:56
Yes, converting is done with Win3D, it's an external program and uses another gui. once you have converted your x to another x, just import your fresh conversion in DBP as an ODE static triangular mesh.

As for bouncing it took me a while but I got something out of it, use the following code before the main loop of your program, note that the important thing to modify is the "ode set world erp 0.2", experiment between 0.0 and 1.0, note that this can cause your player to fall or jump through walls, so test until you find the working value, note aslo that this depends on how your ODE player movement code works.
coolgames
19
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 23rd May 2006 01:35
You need to use code tags. Not the source box. It almost never works.

thebulk71
18
Years of Service
User Offline
Joined: 2nd Jan 2006
Location: takin a poop
Posted: 23rd May 2006 10:01
that's true I noticed that... well, did you test anything I stated above? it should work, and when you make your ODE settings you should try this one (missing source from above):

ode start
ode set world gravity 0.0,-60.0,0.0
ode set world step 0.07
ode set world erp 0.2
ode set world cfm (10^-5)*2.5

this is what I use, it's very stable, but remeber, like I said, the "bounciness" is handled by the "ode set world erp" command, this is what you want to fiddle with, you might have to find a value that balances "bounciness" and "forcing through walls"... ODE is not supported, thus it's all up to us do play with in order to discover it's potential.

Login to post a reply

Server time is: 2024-11-22 06:21:37
Your offset time is: 2024-11-22 06:21:37