BulletSim

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Actor architecture section and initial info on walking up stairs)
(Explanation of step parameters.)
Line 20: Line 20:
 
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.
 
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 three INI parameters that control stairs:
+
There are four INI parameters that control stairs:
* AvatarStepHeight
+
{| class="wikitable" |
* AvatarStepForceFactor
+
|AvatarStepHeight
* AvatarApproachFactor
+
|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.
 +
|-
 +
|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.
 +
|-
 +
|}
 +
 
 +
The default values are:
 +
<code><pre>
 +
[BulletSim]
 +
    AvatarStepHeight = 0.5
 +
    AvatarStepApproachFactor = 0.6
 +
    AvatarStepUpCorrectionFactor = 2.0
 +
    AvatarStepForceFactor = 2.0
 +
</pre></code>

Revision as of 14:20, 23 April 2013

BulletSim

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.

"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 four 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.
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.

The default values are:

[BulletSim]
    AvatarStepHeight = 0.5
    AvatarStepApproachFactor = 0.6
    AvatarStepUpCorrectionFactor = 2.0
    AvatarStepForceFactor = 2.0
Personal tools
General
About This Wiki