Is there any example of collision among two rectangles?
-
I was trying to collide two animated rectangles since a long ago, and I don't find any way to get it.
If someone wants to help me...
-
Not sure what you mean. Do you want find out if they are colliding? Then you could use e.g. http://doc.qt.io/qt-5/qrect.html#intersected
or have a look at the source how it's implemented. -
There are C++ libraries like
http://bulletphysics.org/mediawiki-1.5.8/index.php/Bullet_User_Manual_and_API_documentation -
@Cold_Distance said:
I was trying to collide two animated rectangles since a long ago, and I don't find any way to get it.
What technology are you using? The Qt Graphics View Framework? Qt Quick? OpenGL? Something else?
Here's a Graphics View Framework example: http://doc.qt.io/qt-5/qtwidgets-graphicsview-collidingmice-example.html