Skip to content

class Vob (client-side)

Available since version: 0.1.0

Note

By default the vob is not added to the world. To do that use addToWorld.

This class represents 3d object in the world.

Constructor

string model

Parameters:

  • string model: the model name to be used as visual.

Constructor

userpointer ptr

Parameters:

  • userpointer ptr: the pointer to the object from the game.

Properties

bool cdDynamic

Available since version: 0.1.10

Represents the state of dynamic collision of vob.
Enabling this option will prevent other dynamic objects (i.e. player) from passing through it.


bool cdStatic

Available since version: 0.1.10

Represents the state of static collision of vob.
Enabling this option will prevent static objects (i.e. world mesh) from passing through it.


float farClipZScale

Available since version: 0.1.10

Represents the max distance at which the vob will still be rendered.


string visual

Available since version: 0.1.10

Represents the model file name used as vob visual, e.g SPHERE.3DS.


float visualAlpha

Available since version: 0.1.10

Note

The alpha must be in range between 0.0 (fully transparent) to 1.0 (fully visible).

Represents the transparency of the vob visual.


userpointer ptr (read-only)

Available since version: 0.1.10

Represents the pointer to the object from the game.


Methods

setVisual

Deprecated since version: 0.1.10

This method will set the vob visual.

void setVisual(string model)

Parameters:

  • string model: the vob model file name, e.g SPHERE.3DS.

getVisual

Deprecated since version: 0.1.10

This method will get the vob visual name.

string getVisual()

Returns string:

the vob model file name.


setPosition

Available since version: 0.1.0

This method will set the position of the vob in the world.

void setPosition(float x, float y, float z)

Parameters:

  • float x: the position in the world on the x axis.
  • float y: the position in the world on the y axis.
  • float z: the position in the world on the z axis.

getPosition

Available since version: 0.1.0

This method will get the position of the vob in the world.

{x, y, z} getPosition()

Returns {x, y, z}:

the vob world position.


setRotation

Available since version: 0.1.0

This method will set the rotation of the vob in the world.

void setRotation(float x, float y, float z)

Parameters:

  • float x: the rotation of the vob on the x axis.
  • float y: the rotation of the vob on the y axis.
  • float z: the rotation of the vob on the z axis.

getRotation

Available since version: 0.1.0

This method will get the rotation of the vob in the world.

{x, y, z} getRotation()

Returns {x, y, z}:

the vob world rotation.


addToWorld

Available since version: 0.1.10

This method will add the vob to currently loaded world.

void addToWorld()

removeFromWorld

Available since version: 0.1.10

This method will remove the vob from currently loaded world.

void removeFromWorld()

floor

Available since version: 0.1.10

This method will try to put the vob on floor.
If the difference between vob position and the floor y position is less or equal 1000, the method will succeed.

void floor()