<<VRML 2.0 - An Introductory view by examples

Collision

[example]                                         [run]


It is a grouping node that defines a group of nodes to which collision with the user's avatar will be detected.

{
eventIn MFNode addChildren #
eventIn MFNode removeChildren #
exposedField MFnode children [ ] #
exposedField SFBool collide TRUE # TRUE : perform collision detection
field SFVec3f bboxCenter 0 0 0 #
field SFVec3f bboxSize -1 -1 -1 #
field SFNode proxy NULL # substitute node for the children node for collision detection (is not drawn)
eventOut SFTime collideTime # timestamp of collision event
}

All geometric nodes are collidable except IndexedLineSet, PointSet, and Text. VRML-2.0 does not support object/object collision detection, just avatar/object.

Usage :


  DEF COL Collision {
  children [
     geometries .........

            ]

                     }