Triangles, by DanielH
Everything I've been working on lately has nothing graphical to show so I'm showing you a testing program I wrote and recently modified.
It's my triangle collision detection. It could seriously be optimized, but that isn't my goal at the moment.
I'm having difficulty with the collision detection of the ball. The point where the triangles meet, the ball is passing through. I could be correct though. The end points of the triangles aren't very wide. Hmm. Maybe you could test it and help me.
To make it easier to make triangles I added a Bezier thingy. You could add more curves by modifying the file 'points.txt'. It's not quite accurate, but that's ok.
If that doesn't work then this will
Includes source and win32 binary
P: Move ball to mouse position
Up: Increase Bezier divisions
Down: Decrease Bezier divisions
Minus: Changes - which Bezier to work on
Equals: Changes + which Bezier to work on
A: moves point 1 to mouse position
S: point 2
D: point 3
F: point 4
L: Toggle show Bezier control lines
N: Toggle show triangle normals
This section is only available to registered Allegro.cc members.
The Gallery | Add your own image!