Adding Collision to a object in citrus engine

225 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 best solutions below

0
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.