Hi,
btBoxShape constructor takes a half-extent as a default argument.
These extents are automatically subtracted by the default margin that is set to 4 cm. That means that any box in the range of 0 .. 4 cm will cause inverted dimension which most likely is not what the user want in such a case. One would assume that in the case of a box with very small dimensions, the margin would be something in the range of 0..10% of the smallest dimension (based on the assumption that bullet behaves "best" at 1 m objects with 4 cm radius).
I know that Bullet is recommended not to run with shapes that are smaller than 0.1 units in any dimensions but isn't this kind of behavior quite dangerous as it potentially could lead to people having weird bugs ending up with them spending countless hours trying to track them? One would think that such a behavior would at least be expected to appear in the comments regarding the class that includes this type of dependency.
Cheers,
Simon.
btBoxShape default behavior in constructor.
-
- Posts: 50
- Joined: Thu Jul 09, 2009 1:46 pm
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: btBoxShape default behavior in constructor.
Good point. Can you file an issue in the google issue tracker so we don't forget to fix this?
Thanks a lot,
Erwin
Thanks a lot,
Erwin
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: btBoxShape default behavior in constructor.
I added the issue here: http://code.google.com/p/bullet/issues/detail?id=349
Thanks for the report,
Erwin
Thanks for the report,
Erwin
-
- Posts: 50
- Joined: Thu Jul 09, 2009 1:46 pm
Re: btBoxShape default behavior in constructor.
Sorry, I was on vacation and stuff so missed out on the posts :/