How to create a perfect collision box around an irregular object

For the main ‘character’ of my game I have a BMX bike as a PNG, at the moment of its collison box I’m using a  rect. I need the hitbox to me more precise for the shape of the bike as at the moment it only balances on the square rectangle not the individual wheels.

I’m quite new to corona, any ideas as to how I’d manage to match the shape of the bike for my collision box.

Thanks!

You can either create a physics object out of multiple elements, or create an outline or a chain body, or create multiple independent physics objects and put them together using joints.

One easy method for creating irregular shapes (through multiple elements) is a 3rd party software called PhysicsEditor. PE will let you create multibody objects with ease and then export them to Corona.

You can check the documentation for physics bodies and joints, or you could take a look at some Corona sample projects. For instance, start your Corona simulator, then press help > sample projects, and navigate to joints. You’ll find a rudimentary “car” built using wheel joints there.

I use physics editor too.

@benj.jones7 should also check out texture packer by the same company when you are ready to use sprite sheets to save texture memory.