This site requires JavaScript, please enable it in your browser!
Greenfoot back
Kartoffelbrot
Kartoffelbrot wrote ...

2014/6/22

Collision response

Kartoffelbrot Kartoffelbrot

2014/6/22

#
Hello guys, in the last time I wasn't very active on this website because I have started writing my own 2D game engine. At the begin of the last month I deleted my whole collision detection because it was only useful for non-rotatable rectangles. So I created different classes for colliders: circle, rotatable rectangulars and a rotatable polygons. I have finished the intersection provement for circle-circle, rectangular-rectangular, polygon-rectangle, polygon-polygon and the collision response for circle-circle. In this case collision response does only mean moving out two colliders by the penetration depth into the direction of the collision normal, so that solid objects are simulated. But now I am failing in collision response for two rectangulars. Polygons are not of interest for the first. Rectangulars are defined be width, height, rotation (same implemented as in greenfoot) and their position. Can anyone help me? I can show every code, that is necessary and I will answer all questions. P.S.: I know, that this is a discussion for greenfoot stuff, but I didn't know where to ask.
lordhershey lordhershey

2014/6/22

#
I would like to see, how would you share it?
Kartoffelbrot Kartoffelbrot

2014/6/23

#
Hi lordhershey, I've made it with BlueJ and saved it in Dropbox. I could send/post a link to it, so that you can download it. I could create a package with all the important collision stuff for you because there are very many classes so far, that aren't important in this case. By the way, there is a vector class. too, that might help. And to all: If this is finished I would like to share the code to all, who want.
lordhershey lordhershey

2014/6/23

#
jh@lordhershey.com or public drop box link. Thanks :)
Kartoffelbrot Kartoffelbrot

2014/6/23

#
I sent you an invitation for the demo project via Dropbox. Thanks for help!
You need to login to post a reply.