Hi everyone,
I am trying to use b2Distance for calculating the distance between two shapes. However, it seems to ruin collision detection (i.e. shapes fall through other shapes). Can anyone shed some light on this? How would I go about calculating the distance if not with this?
If I only need two points, wouldn't
Math.sqrt(Math.abs(vector1.x - vector2.x) + Math.abs(vector1.y - vector2.y))
do the trick?
Cheers,
Toby
I am trying to use b2Distance for calculating the distance between two shapes. However, it seems to ruin collision detection (i.e. shapes fall through other shapes). Can anyone shed some light on this? How would I go about calculating the distance if not with this?
If I only need two points, wouldn't
Math.sqrt(Math.abs(vector1.x - vector2.x) + Math.abs(vector1.y - vector2.y))
do the trick?
Cheers,
Toby