CollideAgainstBounce
Introduction
The CollideAgainstBounce method can be used to have two 3D shapes collide against each other and bounce (modify their or their top parent's velocity appropriately).
This function works the same as the CollideAgainstBounce provided for 2D shapes, so for a more detailed discussion, see this page.
Code Example
The following code creates two AxisAlignedCubes, sets the acceleration of one so it falls towards the other, and calls CollideAgainstBounce so that the two collide.
Note that for this example the project is using a 3D camera rather than a 2D camera. For information on how to set up a 3D camera in Glue, see this page.
Add the following at class scope in your Screen:
Add the following to CustomInitialize:
Add the following to CustomActivity:
Last updated