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.
Adding Collision to a object in citrus engine
218 views Asked by user3733029 At
1
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.
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.