Collision Calculator

Collision Calculator

by Roaming Gamer

View and activate on the Corona Store

This plugin allows users to generate a calculator ‘object’ that then allows them to easily configure collisions using names instead of numbers.

It does this by (internally) assigning numbers for each ‘collider name’ and then by auto-calculating filter values based one what objects the user says collide with each other.

In short, this plugin turns a semi-arduous set of calculations into a small amount of easily read and configured code.

Documentation

 Hi,

 At first, thank you and Roaming Gamer for this plugin.

 @Roaming Gamer: do you miss something in your document? In the “collidesWith” function, your doc shows:

-- 'redBall' collides with 'block' and 'greenBall' myCC:collidesWith( "redBall", { "block", "greenBall" } )

But in the sample:

myCC:collidesWith( "redBall", "block", "greenBall" )

 So does it mean they will colide each other or something else?

@Khanh.dq

Many apologies!  The ‘full example’ in the docs needed to be updated.  I have just done so.

Also you can get the code in the example here:

http://github.com/roaminggamer/RG_FreeStuff/raw/master/myPluginSamples/cc/usage.zip

This is for those who don’t want to cut-copy-paste (like me).

Thanks for catching that!

 Hi,

 At first, thank you and Roaming Gamer for this plugin.

 @Roaming Gamer: do you miss something in your document? In the “collidesWith” function, your doc shows:

-- 'redBall' collides with 'block' and 'greenBall' myCC:collidesWith( "redBall", { "block", "greenBall" } )

But in the sample:

myCC:collidesWith( "redBall", "block", "greenBall" )

 So does it mean they will colide each other or something else?

@Khanh.dq

Many apologies!  The ‘full example’ in the docs needed to be updated.  I have just done so.

Also you can get the code in the example here:

http://github.com/roaminggamer/RG_FreeStuff/raw/master/myPluginSamples/cc/usage.zip

This is for those who don’t want to cut-copy-paste (like me).

Thanks for catching that!