Hello,
I am new to QT and am using 5.5 on a Windows 7 box.
I have derived two separate classes from QGraphicsItem and I wish to detect when one collides with the other. One is called Particle, the other is called Vector. When a Vector collides with a particle, if the line().p1() or p2() is anywhere within the rectangle of the Particle, I wish to set the parent item of the vector to be the particle and assign the particle pointer to a member variable of the vector. After that the particle will move all attached vectors as a system when I move it around the screen.
The problem I am encountering is how to determine that the colliding object is a Particle or just another object of some other kind. I thought that using the UserType would be useful here but before I start down a path of code writing, i wanted to see if that is the best solution seeing how I am new to the system and all.
Regards,
-Caolan.
Bookmarks