Collision

From ActiveWiki
Jump to navigation Jump to search

Usage

    [#!]Collision value

Note: [ ] denotes an optional argument.

Description

This command specifies whether the current clump under construction should be included in collision tests. The mode can either be on or off. The collision mode applies to all child clumps of the current clump as well, unless additional collision commands are specified for the child clumps.

The collision attribute is inherited to children and siblings. When used, but only should get applied to a certain group of faces, it must be switched on for children and siblings explicitly again, like the example shows.

Note that Collision is an extended RWX command and can be prefaced with "#!" when used in RWX files that are intended to work with software other than Active Worlds v3.0+.

Possible use

Theoretically, using this command in an object can enable a user to create a separate collision mesh, reducing some calculation in the engine.

Arguments

value is either On or Off

Example

Modelbegin

 ClumpBegin
   ClumpBegin
     collision off
     # vertices and faces of geometry1 go here
     # e.g. leaves of a tree
   ClumpEnd
   ClumpBegin
     collision on
     # vertices and faces of geometry2 go here
     # e.g. trunk of a tree
   ClumpEnd
 ClumpEnd

ModelEnd

Part of the model has collision turned off. Note the nested master clump.