markcwm / openb3d.mod

OpenB3D BlitzMax wrapper, see openb3d.docs for examples
18 stars 7 forks source link

Can't test collisions if a type has "Collisions" with 2 or more other types. #5

Closed Kippykip closed 6 years ago

Kippykip commented 6 years ago

I found out that if you use the "Collisions" function on a type to have collisions for multiple other objects, you can't actually test for it. Functions such as EntityCollided and CountCollisions are broken because of it. This bug is not present in MiniB3D.

Here's the thread on SyntaxBomb https://www.syntaxbomb.com/index.php/topic,4071.msg12630.html

Here's an example below that colors the bullet and changes the text if it collides with an object. collisionbug.zip

It's likely not a fault in the wrapper but the library itself.

markcwm commented 6 years ago

Thanks for the report and example! This should be resolved in commit 1272234a154f7843514214fa969b4f7c6de2b927, also the latest commit ed3150fc524270710e8fcc9fc79d73c9f147663a inverts the index order of the entity collision vector as this was reversed in Openb3d.