Page 1 of 1

Finding the ground (part II)

Posted: Wed Jun 02, 2010 12:28 pm
by jbosch
Hi,

I think I've found a polstergeit in my code. I initialize 2 cylinders over a plane, this way:

Code: Select all

bowl[0] = new Cylinder(new Vector3(-5.0f, 0.15f, -50.0f), 1.0f, 0.5f, 0.1f);
bowl[1] = new Cylinder(new Vector3(-3.0f, 0.15f, -50.0f), 1.0f, 0.5f, 0.1f);
It works fine! But when I do this...

Code: Select all

bowl[0] = new Cylinder(new Vector3(-5.0f, 0.15f, -50.0f), 1.0f, 0.5f, 0.1f);
bowl[1] = new Cylinder(new Vector3(5.0f, 0.15f, -50.0f), 1.0f, 0.5f, 0.1f);
The bowl[1] jumps and has a strange behaviour!

You can see it here: http://www.verticaling.com/video.avi

Re: Finding the ground (part II)

Posted: Wed Jun 02, 2010 1:17 pm
by jbosch
changing the height of the cilinders (make them higher) works well... is that a bug?

Re: Finding the ground (part II)

Posted: Wed Jun 02, 2010 5:44 pm
by Norbo
In the video, it looks as if they are both stuck in the ground. The one in the middle of a triangle rises smoothly upward, while the one on a triangle edge gets pushed around resulting in a pop. If the triangles are at a height of 0, then the cylinders (with height 1) would need to be at around 0.54-0.58.

I have plans to improve the inter-triangle collisions in meshes, as well.