Physics

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

Contents

Overview

See Entity Physics for functions that operate specifically on an entity.

Some of these functions are related to Physics Console variables.

Functions

Explosions

SimulateExplosion(tableExplosion)
RegisterExplosionShape(sGeometryFile,fSize,nIdMaterial,fProbability,sSplintersFile,fSplintersOffset,sSplintersCloudEffect)
RegisterExplosionCrack(sGeometryFile,nIdMaterial)

Raycast

RayWorldIntersection(src, dir, maxHits, entityTypes, skipEntity1, skipEntity2, hitTable)
perform a raycast and check for intersections


RayWorldIntersectionAR(src, dir, maxHits, entityTypes, skipEntity1, skipEntity2, hitTable)
extended version of RayWorldIntersection


RayTraceCheck(vSrc,vTrg,hSkipEntityId1,hSkipEntityId2)
SamplePhysEnvironment(vPoint,fRadius)

Collision

Objects will only bounce if the collision velocity exceeds the minimum bounce speed. Also see the console variable p_min_bounce_speed


GetMinBounceSpeed()
return the minimum bounce speed
SetMinBounceSpeed(speed)
set the minimum speed at which colliding objects will bounce

Bounce impulses over a certain threshold are discarded. See also p_max_bounce_impulse.


GetMaxBounceImpulse()
return the maximum bounce impulse
SetMaxBounceImpulse(max)
set the maximum bounce impulse

Velocity

GetMaxVelocity()
query the maximum allowed speed of physicalized objects
return value - float maximum speed
by Avatar Reality , last modified on 3/6/2009


SetMaxVelocity(speed)
set the maximum allowed speed of physicalized objects
speed - float new max velocity
by Avatar Reality , last modified on 3/6/2009

Gravity

These functions access the world gravity vector.

GetGravity()
SetGravity(gravity)

In most cases, you only want a gravity with a z component (specifically, a -z value for downward).


GetGravityZ()
SetGravityZ(gravity)

Console

Use Console/Physics variables to experiment with global physics parameters.

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools