From OpenSimulator

Revision as of 17:34, 23 April 2013 by Misterblue (Talk | contribs)

Jump to: navigation, search



BulletSim is the module for OpenSimulator that creates virtual world physics using the Bullet Physics Engine. This module will provide high performance physics as well as physical vehicle performance compatible with Second Life.

Project Information

BulletSim/Functionality lists the possible physical operations, their implementation state and any notes on their use. This is particularly useful for vehicle operations.


BulletSim Architecture

Bullet Implementations

Stuff about there being both C++ Bullet and C# BulletXNA

Managed/Unmanaged Interface

"Actor" Architecture

Each BulletSim physical object can have any number of "actors" attached to it. The actors register for simulation events (usually to be called before each simulation step) and change the physical parameters of the object. The currently implemented actors are:

  • BSActorAvatarMove: controls movement and stairs walking of avatars;
  • BSActorHover: implements vertical hovering for objects and avatars;
  • BSActorLockAxis: applies a constraint to physical objects to lock one or more angular axis movement;
  • BSActorMoveToTarget: moves a physical object to a location;
  • BSActorSetForce: applies a continuous force to a physical object;
  • BSActorSetTorque: applies a continuous torque to a physical object;
  • BSDynamic (name will change): implements SecondLife(r) vehicle model.

Avatar Walking Up Stairs

The avatar movement actor include special checks to allow avatars to move up stepped objects (think stairs). The code works by checking for collisions close to the avatar's feet and, if trying to walk forward and not flying, pushing the avatar up to get over the object. This is a different algorithm than ODE which relies on the curvature of the avatar's capsule to move up and over low obstacles.

There are five INI parameters that control stairs:

AvatarStepHeight The maximum height of a step. If the avatar collides with something of less than this height, it will be considered a step and the avatar will consider moving up to get over it;
AvatarApproachFactor The angle the step must be approached. This is the radians of the angle between the avatar and the colliding step surface. This prevents walking up things when approached from a wide angle. The default of 0.6 is about a 45 degree approach angle. Setting this down to 0.3, for instance, requires the avatar to be walking nearly directly into the step to get the up actions.
AvatarStepUpCorrectionFactor A multiplication factor for changing the avatar's position to get over the step. The height of the collision with the step is multiplied by this factor and that number is added to the avatar's Z coordinate. This moves the avatar up in relation to the step. If this factor is less than zero, the AvatarStepHeight is used.
AvatarStepForceFactor A force factor to push the avatar up to get over the step. An up force of the step collision height times the avatar mass times this factor is applied to the avatar. These last two factors can be used in combination for moving the avatar when a step is collided with.
AvatarStepSmoothingSteps when an avatar walks up the steps, collisions go on and off as the steps are hit and moved over. This is the number of simulator ticks (about 10 per second) that walking up steps will still be performed after the last step collision is sensed. This smooths out the action a little.

The default values are:

    AvatarStepHeight = 0.5
    AvatarStepApproachFactor = 0.6
    AvatarStepUpCorrectionFactor = 1.0
    AvatarStepForceFactor = 1.0
    AvatarStepSmoothingSteps = 2
Personal tools
About This Wiki