Fixed a bug where attempting to collide with an empty mesh (0 vertices) would throw an exception rather than returning 0 results.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10643 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
2c9bef5ebf
commit
9b6bd1fdc4
@ -896,6 +896,10 @@ public class Mesh implements Savable, Cloneable {
|
|||||||
BoundingVolume worldBound,
|
BoundingVolume worldBound,
|
||||||
CollisionResults results){
|
CollisionResults results){
|
||||||
|
|
||||||
|
if (getVertexCount() == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (collisionTree == null){
|
if (collisionTree == null){
|
||||||
createCollisionData();
|
createCollisionData();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user