How To Setup Physics E-mail
Supplemental Object Documentation

1. Overview

The Physics object is responsible for the movement of objects within the environment relative to the laws of physics.

2. Methods

 Move <x> <y> <z>

Move the object in any direction.

 Rotate <x> <y> <z>

Rotate the object around the position axis.

 SetDestination <x> <y> <z>

Set the destination point of an object.

 SetDirection <x> <y> <z>

Set the look-at point of an object.

 SetFriction <force>

Set the friction factor of the ground level relative to the gravity, and weight.

 SetGravity <force>

Set the gravity force.

 SetGround <ground>

Set the ground level.

 SetPosition <x> <y> <z>

Set the position point of an object.

 SetRotation <x> <y> <z>

Set the rotation factor of an object.

 SetWeight <weight>

Set the weight of an object.


Synchronize, and update the movement for the next display buffer.

3. Properties

 Destination <vertex>

The destination point of an object.

 Direction <vertex>

The look-at point of an object.

 Gravity <single>

The gravity force.

 Ground <single>

The ground level.

 Position <vertex>

The position of an object.

 Rotation <vertex>

The rotation of an object.

 Velocity <single>

The velocity of an object.

 Weight <single>

The weight of an object.

4. Example

The following example is based upon the engine being initialized at which point the laws of physics are generated and applied to any object.

' Game Basic 3D Engine Build 4096
' Copyright © Monarke Studios. All Rights Reserved.
Private Physics As New GameBasic3D.Physics
' Engine.Initialize
Physics.SetFriction 1
Physics.SetGravity 10
Physics.SetWeight 100
    ' Obtain the Object transformations
    Physics.Position = Object.Position
    Physics.Rotation = Object.Rotation
    ' Apply and update the physics
    ' Apply the new Object position
    Object.SetPosition _
    Physics.Position.X, _
    Physics.Position.Y, _
    ' Apply the new Object rotation
    Object.SetRotation _
    Physics.Rotation.X, _
    Physics.Rotation.Y, _
' Engine.End
Set Physics = Nothing

5. Disclaimer 

Please note that only the three basic laws of Newtonian physics are incorporated, but all other objects are explicitly designed to be used together with more advanced third-party physics engines. Please refer to the other online content, and technical reference included with the installation for further documentation.