Physics/RayWorldIntersection

From Blue Mars Developer Guidebook

Jump to: navigation, search


This is a Physics function.

Contents

Overview

Function

RayWorldIntersection(src, dir, maxHits, entityTypes, skipEntity1, skipEntity2, hitTable)
perform a raycast and check for intersections
src - start position of raycast, a vector
dir - direction of raycast, a vector
maxHits - maximum number of hits to register, a number
entityTypes - bit flags specifying the types of entities to register
skipEntity1 - ID of entity to ignore (typically object at raycast source)
skipEntity2 - ID of another entity to ignore (typically object at raycast target)
hitTable - a Lua table in which to store the hit information

Entity Types

The entity types:

ent_static
ent_sleeping_rigid
ent_rigid
ent_living
ent_independent
ent_terrain
ent_all
ent_sort_by_mass

Hit Table

  • list here

Usage

Notes

  • objects must be physicalized to be detected by this raycast

See also RayWorldIntersectionAR

Examples

  • PressurizedObject.lua - in CheckDamage, sees if leaks hit and damage any entities
  • BasicActor.lua
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