Happy-Howard
20-11-2006 11:40:08
Hello! I'm making a minature golf game. I model the courses with google sketchup. When the ball is rolling almost parallel to a triangle edge it deviates from it's initial direction when it hits the edge. I use EntityInformer::createStaticTriangleMesh to create the ground. I can't just use a plane since I have a hole in the ground.
I would appreciate any input or tip you could give me.
Happy-Howard
21-11-2006 15:32:58
I would really need some help
Doesn't anyone have any ideas?
first i would try to avoid those small and large triangles.
try doing a small quad in the "big" plane surrounding the hole, something like this:
___________
| ____ |
| | | |
| | O | |
| |____| |
| |
|_________ |
hope this helps
EDIT: I'm not good doing ascii art
Happy-Howard
22-11-2006 08:18:41
Thanks Luis, I will try that
nikki
22-11-2006 13:04:35
You could also try to make the boundary of the hole (the circle) have lesser 'edges'.
Happy-Howard
22-11-2006 13:44:19
I was actually about to write you before Nikki. If I remember correctly You make a game where the character is a ball? I thought maybe you had the same problem I have.
Threr is a known problem in ODE with sphere-trimesh collision, when spheres collides with an edge. It's what i'm trying to solve here:
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=2958
Take a look in ODE mailing list you'll find many possible solutions (commenting edge collision in ode, merging contacts,..)
hth
Happy-Howard
11-12-2006 12:42:30
Yes I found some posts about it on the mailing list. I should have posted it here for people searching this place too. Here is the most informative discussion I found about it.
http://q12.org/pipermail/ode/2006-April/018239.html
The only thing I have done right now is decreasing:
mWorld->setContactSurfaceLayer(0.00005);
That will do for me for now. One problem that can occur is that the ball sort of jitters and have a hard time coming to rest. With the value I'm using now that isn't a big problem.
tuan kuranes
14-12-2006 13:47:26
You might want to try to use OgreOde "terrain" as golf ground. Make sure you applied latest patch I proposed on Ode patch sourceforge tracker to get correct and fast collision handling.
nikki
18-12-2006 13:53:00
Make sure you applied latest patch I proposed on Ode patch sourceforge tracker to get correct and fast collision handling.
How do we apply patches?
tuan kuranes
18-12-2006 15:32:28
Windows : use tortoise SVN->right clik->apply patch
Linux : patch -p0 < mypatch.txt