Controlling Collision Detection

on this page: turning collision off | turning collision on | proxies

By default, all objects in the scene are collidable. You can't walk through walls or tables, and you can't end up inside of a planet or other closed solid object. You can use the Collision Editor to turn off collision detection for certain groups of objects (or for the whole scene if you want the user to feel like a ghost who can walk through objects and walls).

You can also use the Collision Editor to specify that a simpler geometry, called a proxy, be used in place of the actual object when Cosmo Worlds is testing for collisions. The proxy can be either a box, a sphere, or some other object defined in the VRML file. Using proxies speeds up performance because the test for collisions is much simpler than testing against more complex geometries.

Find it: Click the Collision Editor button on the Action palette:

Turning Collision Off

To improve performance, turn off collision detection when it's not needed. Follow these steps:

  1. In the main window, select the objects that are not collidable.
  2. Press the Create Collision Grouping button. This creates a collision group and makes the selected objects children of that group. (As with any group, if the objects are currently children in some other group, they are removed from that group before they are inserted into this group.)
  3. Click the Enable Collision Detection box to turn off collision detection (the red check in the box disappears).

Turning Collision On

To turn collision back on after you've turned it off, follow these steps:

  1. In the main window, select the collision group.
  2. In the Collision Editor, press the Remove Collision Grouping button. This action ungroups the children, and they now become top-level objects.

Proxies

A proxy is an object, usually with simple geometry, that is used in place of actual geometries for purposes of detecting collisions. By default, the actual objects are used for collision detection, and no proxies are used.

To use a bounding box (shown below) as a collision detection proxy for a table, create a collision grouping for the table and select it. Then select Bounding Box from the Collision Detection Proxy pulldown menu.

To use a bounding sphere (shown below) as a collision detection proxy for a table, create a collision grouping for the table and select it. Then select Bounding Sphere from the Collision Detection Proxy pulldown menu. A bounding sphere is a sphere that completely encloses the collision group.

The Other proxy setting is used for proxy objects that are defined directly in the VRML file.

At first, you won't be able to see the collision box or sphere. Use the pulldown menu under Show Collision Group As to view the proxy (or both the proxy and the objects themselves). The two images on this page use Both for this setting, which displays both the proxy and the actual objects.

Jump to: