From OpenSimulator

Jump to: navigation, search
string osGetPhysicsEngineType()
This function returns a string containing the name of the Physics Engine.
Threat Level High
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
// osGetPhysicsEngineType Script Example
// Author: djphil
        llSay(PUBLIC_CHANNEL, "Touch to see osGetPhysicsEngineType usage.");
    touch_start(integer number)
        string physics_engine_type = osGetPhysicsEngineType();
        if (physics_engine_type == "ubODE")
            llSay(PUBLIC_CHANNEL, physics_engine_type + " is detected ...");
            llSay(PUBLIC_CHANNEL, physics_engine_type + " is not detected ...");
This function was added in 0.7.6-post-fixes

This function does not throw an exception if the threat level is not high enough.
If 'os' functions are enabled this function will return an empty string if the threat level is not met.
This allows vehicle scripts to always check this and not worry about exceptions.
The value returned is the name of the physics engine specified in the OpenSim.ini file ("physics = XXX").
It is usually either "OpenDynamicsEngine", "BulletSim" or "ubODE".

Personal tools
About This Wiki