[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Line Collision
It seems so simple a problem to our eyes. But it's computationally a
non-trivial problem. You can find algorithms on the web mostly in other
languages and convert them to Python, like I did here.
https://bitbucket.org/gummbum/gummworld2/src/200e9350acca33d40b0c41c9e74c0eaeb6079061/gamelib/gummworld2/geometry.py?at=default&fileviewer=file-view-default#geometry.py-151
I would love to see this stuff in a native lib. I might do it myself
but...Windows.
On 11/18/2017 8:26 AM, gabrielslomka@xxxxxxxxx wrote:
Hey, supose i have a Rect and a Line, i just want to see if the line
intercepts the rect, is that possible somehow in a kind of optimized
way ? Im having trouble implementing this.
Thanks in advance !