[ODE] Ball changes direction at intersection with triangle edge

Deak Szabolcs ancient at ludens.elte.hu
Wed Nov 22 09:01:20 MST 2006


Hi!

I can't comment much on the exact nature of your problem, but I believe 
the 3d design of the course itself is sub-optimal, to say the least. The 
extremely elongated triangles you use might well be the only cause of 
the problem. The things is, you probably wanted to achieve the smallest 
triangle count or didn't think too much about the design, but plucking a 
hole like that into a big quad is not a good modeling idea. I would 
suggest increasing the base tesellation of the "flat" surface, then 
placing a quad/triangle first where you want the hole and _then_ placing 
the hole inside that quad/triangle. While this would (slightly) increase 
your triangle count it would keep the triangles more even-sided and less 
prone to the problem you describe.

Szabolcs

Ps. I don't know whether collision response uses interpolated vertex 
normals to calculate the collision-point normal direction, if it does 
this could be the problem if the vertices at the edge of the hole have 
only one "averaged" normal! (of course that would show up in shading too 
if you have lighting turned on)
Elongated triangles are not good either way.

Johan Oberg wrote:

>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 the
>wrapper OgreOde and 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.
>
> 
>
>I have a picture to illustrate my problem on my homepage.
>
> 
>
>http://hem.bredband.net/johaob/
>
> 
>
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>  
>



More information about the ODE mailing list