I’ve a problem when I tried to detect collsion between my two 3ds models.
I modified TestCollision.java from
to
as you can see, I replaced the boxes with my models
the problem is when I did that, it will always print “Collision: Yes”
my assumption is I didn’t call updateModelBound() yet but this is also a problem.
because the type of my models are Spatial not Geometry. It doesn’t have the function so I can’t call it.
Note:
all of my models have their own bounding box
jbr.setProperty("bound", "box");
I've also tried ("bound", "obb") instead, but I got the same result.
and this is how I detect collision (same as the TestCollision.java)
results.clear();
n1.calculateCollisions(scene, results);
if(n1.hasCollision(scene, false)) {
System.out.println("hasCollision also reports true");
}
any help would be much appreciated