I'm making a simple platform game using shapes, and I have a question about grouping objects. When the player bounds intersects with the grounds bounds, it stops at the ground. However, so far I only have one rectangle as my ground, and when I add more I don't want to write a collision code for every single rectangle. Is something somewhat similar to this possible to do? :
Note: the rectangles are made in the design view, not using a paint event.Code:dim GroundRectangles as new objectgroup GroundRectangles.Add(ground1, ground2, ground3, ground4) If player.bounds.intersectswith(GroundRectangles.member.bounds) then 'do stuff




Reply With Quote