Adding Collision to a object in citrus engine

211 views Asked by At

I have a hero and a enemy,Now When a hero contact the enemy the hero should automatically fall down.How can I add a Collision method to it.

1

There are 1 answers

0
Andrey Popov On

Well do some research! There are a lot of samples out there that Aymeric has posted.

The most common is to use the SimpleCitrusSolver. It's quite easy and is done with one line of code: simpleCitrusSolver.collide(DynamicObject, StaticObject); You can find more for this in the simple collision example.

Other samples can be found at the Citrus Engine Examples github page.