Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by Witek900 » Tue May 19, 2009 2:58 pm
Hi. I have problem with NewtonBodyGetAABB function in Newton 2.0. I have about 1000 objects on scene and i have to compute AABB of each body. In one of static objects (TreeCollision) i get wrong results:
p0: -48,255 -0.255 -48,255
p1: 48,255 0.255 48,255
But it should be:
p0: -48.255 -0.255 -48.255
p1: 48.255 18.255 48.255
I checked everything 100 times but it's Newton's fault.
Any ideas?
PS: sorry for my English
-
Witek900
-
- Posts: 38
- Joined: Mon Jan 26, 2009 1:29 pm
- Location: Warsaw
by Leadwerks » Wed May 20, 2009 1:25 pm
I thought the AABB error was fixed. I actually still got crashes with the support vertex method, on some bodies. I believe I posted a sample on the forum, somewhere.
-
Leadwerks
-
- Posts: 569
- Joined: Fri Oct 27, 2006 2:54 pm
by Witek900 » Wed May 20, 2009 2:21 pm
Sorry. It was my fault! I just chcecked AABB of wrong body
Now all is ok, NewtonBodyGetAABB works perfect, and finally i don't have access violation
I have question. Why AABB from NewtonBodyGetAABB is greater by 0.225 at each side than it should be? To avoid situation 0 volume AABB or other bugs? It is't problem, but if AABB was smaller, I would have better Occlusion Culling and a little bit more FPS in my engine.
PS. Julio, your engine is great
-
Witek900
-
- Posts: 38
- Joined: Mon Jan 26, 2009 1:29 pm
- Location: Warsaw
by Julio Jerez » Wed May 20, 2009 5:44 pm
Leadwerk, that cannot be possible, GetSupportVertex is the heart of all of the collision routine in the engine.
you where crashing because some complex shapes did not have the function defined, but after I expose the method you reported the Bug and I fixed.
as I recall you said it was working find after the Fix.
Witek900, like I said the AABB calculated by GetAABB funtion is a optima Box for findon ovelaping AABB in the collision system.
If you wnat a loose fit AABB you can use that function, but if you need one that is exact, you should use the recomended method in the FAQ.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JernejL » Wed Nov 09, 2011 9:17 am
Ponker wrote:Why does this newton function -> NewtonBodyGetAABB returns 6 float points?
How else will you specify an AABB box?
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 5 guests