Skip to first unread message

underscorediscovery

unread,
Sep 11, 2013, 11:26:30 PM9/11/13
to haxe...@googlegroups.com
Hello haxe group, 

A while back, I created a direct port of this code, and submitted it to the haxelib repo as "hxcollision".
Today I had a few minutes and updated it to include bug fixes, and new features (like ray/line collision tests).

I figured I will post it here for others to use, here are the facts:
  • This is a port of Separating Axis Theorem, for collision detection between shapes, and lines.
  • Supports polygons and circles, and line/raycast collisions currently.
  • See tests/ for a OpenFL ready test project. Also includes OpenFL drawing class. 
  • The library itself is not specific to OpenFL. 
  • COLLISION ONLY. No physics here. By design :)
  • Contributions/bugs/requests welcome
There is a live demo here : Flash demo

Github repo : https://github.com/underscorediscovery/hxcollision/
Haxelib repo : `haxelib install hxcollision` or http://lib.haxe.org/p/hxcollision

Other notes : 
 - This was a direct port, a lot of the code is a bit untidy and definitely needs cleanup. I plan to do this in the near future.
 - The library appears to be stable with rotated polygons and all that, just be aware of "order of operation" between translation, scale and rotation. Rotating after a translate will rotate around the origin still.
 - Create issues on the github page for bugs, or features etc.
 - Tested in flash, android, iOS, mac, html5 

Enjoy, and I look forward to seeing what you use it for! 

Sven / _discovery
+ http://underscorediscovery.com
--
~


Maximiliano Fernández

unread,
Sep 12, 2013, 11:51:10 AM9/12/13
to haxe...@googlegroups.com
Great stuff. Thanks for sharing ;)

Maximiliano Fernández do Santos

0 1 0              0 1 0
0 0 1  Rammserker  1 0 0
1 1 1              1 1 1


--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

Tarwin Stroh-Spijer

unread,
Sep 12, 2013, 1:04:11 PM9/12/13
to haxe...@googlegroups.com
Awesome mate!



Tarwin Stroh-Spijer
_______________________

Touch My Pixel
http://www.touchmypixel.com/
cell: +1 650 842 0920
_______________________

Dion Whitehead Amago

unread,
Sep 13, 2013, 11:58:31 AM9/13/13
to haxe...@googlegroups.com, tar...@touchmypixel.com
Great work, thanks for sharing!
Reply all
Reply to author
Forward
0 new messages