Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm a beginner to Corona and game development. I am using a variety of objects in my game. On collision, they all perform the same function. I want them to do different things, and also want some objects to only collide with certain other objects. How would I go about doing this?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Collision events parameters for the objects involved in a collision. The parameters are named "other" or "other1" depending how how exactly you setup the collision event listener. Here's the documentation:

http://developer.anscamobile.com/content/game-edition-collision-detection#Global_collision_listeners

To have control which objects actually collide use collision masking: http://developer.anscamobile.com/content/game-edition-collision-detection#Collision_categories_masking_and_groups

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.