|How To Setup Volumes|
Supplemental Object Documentation
The Volumes are the primary collision detection system used by referencing a bounding box for every physical object within the environment.
Collision is returned when a volume object collides with another.
Distance returns the vertex coordinates from the volume object specified.
Intersect is returned when a volume object collides with a static point.
Render the specified volume object bounding boxes.
The following example is based upon the engine being initialized at which point several collision checks between multiple objects are performed.
' Game Basic 3D Engine Build 4096 ' Copyright © Monarke Studios. All Rights Reserved. Private Volume As New GameBasic3D.Volume ' Engine.Initialize Do ' Engine.Begin ' Render the Volumes Volume.Render Map.Volume Volume.Render Mesh.Volume Volume.Render Model.Volume Volume.Render Particle.Volume ' Engine.Synchronize If Volume.Collision(Mesh.Volume, Map.Volume) Then ' Model has collided with the Map End If If Volume.Intersect(Camera.Position, Offset, Model.Volume) Then ' Camera has collided with the Model End If ' Decal the Particle volume against the Mesh relevant to the Cursor selection Particle.Decal = True Particle.Destination = _ Volume.Distance(Camera.Position, Cursor.Direction, Mesh.Volume) Loop ' Engine.End Set Volume = Nothing
Please note that the objects, and other various effects that can help extend the example are not entirely present but assume you're already familiar working with them. Please refer to the other online content, and technical reference included with the installation for further documentation.