BulletSim/ScriptFunctions

From OpenSimulator

Revision as of 15:47, 22 August 2013 by Misterblue (Talk | contribs)

Jump to: navigation, search

OpenSimulator => BulletSim => Script Functions

BulletSim Script Functions

Contents

Physics engines have an extension interface enabling extended functions. BulletSim adds script functions which call the extension interface and add control of physics parameters and new functionality.

This feature requires the mod_invoke feature to be enabled on the region the script is running on.

Information

string physGetEngineType()

string physGetPhysicsParameter(string parameterName)

void physSetPhysicsParameter(string parameterName, string value)

Physics Parameters

PHYS_LINKSET_TYPE_CONSTRAINT = 0

PHYS_LINKSET_TYPE_COMPOUND = 1

PHYS_LINKSET_TYPE_MANUAL = 2

void physSetLinksetType(integer linksetTypeCode)

void physSetCenterOfMass(vector centerOfMassDisplacement)

Extended Linksets

void physChangeLinkParams(integer linkNum, list parms)

Flag Description Usage
PHYS_PARAM_LINK_TYPE
PHYS_PARAM_FRAMEINA_LOC
PHYS_PARAM_FRAMEINA_ROT
PHYS_PARAM_FRAMEINB_LOC
PHYS_PARAM_FRAMEINA_ROT
PHYS_PARAM_LINEAR_LIMIT_LOW
PHYS_PARAM_LINEAR_LIMIT_HIGH
PHYS_PARAM_ANGULAR_LIMIT_LOW
PHYS_PARAM_ANGULAR_LIMIT_HIGH
PHYS_PARAM_USE_FRAME_OFFSET
PHYS_PARAM_ENABLE_TRANSMOTOR
PHYS_PARAM_TRANSMOTOR_MAXVEL
PHYS_PARAM_TRANSMOTOR_MAXFORCE
PHYS_PARAM_CFM
PHYS_PARAM_ERP
PHYS_PARAM_SOLVER_ITERATIONS
PHYS_PARAM_SPRING_AXIS_ENABLE [PHYS_PARAM_SPRING_AXIS_ENABLE, int axisCode, bool flag]
PHYS_PARAM_SPRING_DAMPING [PHYS_PARAM_SPRING_DAMPING, int axisCode, float damping]
PHYS_PARAM_SPRING_STIFFNESS [PHYS_PARAM_SPRING_STIFFNESS, int axisCode, float stiffness]

Axis Specification

Some of the parameters specify a constraint axis. The axis values mean:

axisCode meaning
0 X linear axis
1 Y linear axis
2 Z linear axis
3 X angular axis
4 Y angular axis
5 Z angular axis
PHYS_ALL_AXIS (-1) make changes to all axis
Personal tools
General
About This Wiki