Farseer.BMX Update (v 1.1)

I was made aware of a serious issue with detecting collisions between TGeom’s recently. While it did not affect anyone who was using the engine and letting the TPhysicsSimulator run and manage collisions and dynamics, anyone who wished to use Farseer.BMX’s collision routines separately by calling TGeom.CollideWithGeometry() ran into issues. The code has since been fixed and updated. Please update your Farseer.BMX module so you can continue using it without this annoying bug.

Download: Farseer.BMX v1.1

What if I made customizations to the Farseer.BMX code already?

Well thankfully, the bug was isolated to only one file, and in particular one method. If you wish to keep your custom build of Farseer but want to fix the issue then simply download this new version and take the Collisions/Geom.bmx file from it and place it in your corresponding Farseer.BMX directory.

If you happened to make changes to the Geom.bmx file itself, then simply search for the method ‘CollideWithGeometry()’ in the new version and place it in your current version. For those that simply want the code that’s changed (since this is a small change) I pasted it below:

[blitzmax2]
Method CollideWithGeometry:Int(geometry:TGeom)
For Local i:Int = 0 To _worldVertices.Count() – 1
_vert = _worldVertices._vecArray[i]
If geometry.Collide(_vert) Then
Return True
End If
Next

For Local i:Int = 0 To geometry._worldVertices.Count() – 1
_vert = geometry._worldVertices._vecArray[i]
If Self.Collide(_vert) Then
Return True
End If
Next

Return False
End Method
[/blitzmax2]

This was a minor update that I thought was critical to getting out there for those that may be experiencing problems, so there aren’t any ‘extras’. Documentation is still a WIP.

1 comment

Leave a Reply to Kevin Cancel reply

Your email address will not be published. Required fields are marked *