Walkabout  7/4/2013
Floor and Wall collision code
 All Classes Namespaces Functions
Static Public Member Functions | List of all members
walkabout.walkabout Class Reference

walkabout class This class is used to enable walking over geometry in Omegalib. More...

Static Public Member Functions

def init
 Initialize by setting the desired camera to use. More...
 
def setClimbRatio
 Set climb ratio The proportion of the body height that constitutes something you can climb. More...
 
def setRayAngle
 Set the angle at which a sloped ray is fired to check for obstacles in your way as you navigate. More...
 
def setClimbInterpolationSpeed
 Set the speed at which climbing and falling is interpolated. More...
 
def setWallCheck
 Enable or disable wall collision checking. More...
 
def setFloorCheck
 Enable or disable floor collision checking. More...
 
def update
 Call this function each time in your OmegaLib update function and give it the dt. More...
 

Detailed Description

walkabout class This class is used to enable walking over geometry in Omegalib.

Collision detection is also provided so that you can't walk through walls or over high tables or fences, for example. It works by firing a ray downward in the scene to determine how high to raise you, and it also fires a second ray forward and downward to look for barriers in the direction you are walking.

Member Function Documentation

def walkabout.walkabout.init (   camera)
static

Initialize by setting the desired camera to use.

Parameters
cameracamera to use for navigation (usually from getDefaultCamera())
def walkabout.walkabout.setClimbInterpolationSpeed (   speed)
static

Set the speed at which climbing and falling is interpolated.

Parameters
speedValid ranges are > 0 and <= 1
def walkabout.walkabout.setClimbRatio (   ratio)
static

Set climb ratio The proportion of the body height that constitutes something you can climb.

Parameters
ratioDefault is 0.3. e.g. if climbRation is 0.3 that means you can climb things that are 30% of your body height Valid ratios are > 0 and <= 1
def walkabout.walkabout.setFloorCheck (   val)
static

Enable or disable floor collision checking.

By default it is enabled.

Parameters
valSet to True to enable wall floor checks or False otherwise.
def walkabout.walkabout.setRayAngle (   angle)
static

Set the angle at which a sloped ray is fired to check for obstacles in your way as you navigate.

Parameters
angleDefault is 20 degrees. e.g. 20 degrees means the ray is 20 degrees from the vertical aimed downwards from the head. Valid angles are > 0 and <= 90
def walkabout.walkabout.setWallCheck (   val)
static

Enable or disable wall collision checking.

By default it is enabled.

Parameters
valSet to True to enable wall collision checks or False otherwise.
def walkabout.walkabout.update (   dt)
static

Call this function each time in your OmegaLib update function and give it the dt.

Parameters
dtGive it dt from Omegalib's update function.

The documentation for this class was generated from the following file: