Button
Posted: Sat Feb 16, 2013 1:32 pm
I want to create buttons attached to dynamic entities, which the player can click (using raycast). These buttons shouldn't collide with other objects. I'm trying to figure out the best way to do this. I'm considering using a compound shape to add the button to the entity's shape, and then change the collision rules of the button so it doesn't collide with anything. Or I could add all the buttons to the space at the right locations when the player clicks, and then remove them afterwards. Or I could just store the buttons outside of the space and only calculate their current location when the player clicks, and then just ray cast all of them (I would still have to raycast the world to make sure nothing is hiding the button that is hit). Do you have any better Ideas? If not, which one of mine would you prefer? I'll have a relatively large amount of these buttons for my final game.