|How To Setup Physics|
Supplemental Object Documentation
The Physics object is responsible for the movement of objects within the environment relative to the laws of physics.
Move the object in any direction.
Rotate the object around the position axis.
Set the destination point of an object.
Set the look-at point of an object.
Set the friction factor of the ground level relative to the gravity, and weight.
Set the gravity force.
Set the ground level.
Set the position point of an object.
Set the rotation factor of an object.
Set the weight of an object.
Synchronize, and update the movement for the next display buffer.
The destination point of an object.
The look-at point of an object.
The gravity force.
The ground level.
The position of an object.
The rotation of an object.
The velocity of an object.
The weight of an object.
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 Do ' Obtain the Object transformations Physics.Position = Object.Position Physics.Rotation = Object.Rotation ' Apply and update the physics Physics.Update ' Apply the new Object position Object.SetPosition _ Physics.Position.X, _ Physics.Position.Y, _ Physics.Position.Z ' Apply the new Object rotation Object.SetRotation _ Physics.Rotation.X, _ Physics.Rotation.Y, _ Physics.Rotation.Z Loop ' Engine.End Set Physics = Nothing
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.