API Docs for: 0.9.16
Show:

PhysicsEntity Class

Defined in: phoria-entity.js:588
Module: Entity

PhysicsEntity builds on the basic entity class to provide very basic physics support. The entity maintains a position and a velocity that can be manipulated via constant and impulse forces. It also optionally applies gravity. After the physics calculations the entity matrix is updated to the new position.

Item Index

Methods

Methods

create

(
  • desc
)
 Factory create method - object literal Entity descripton:
 {
    velocity: {x:0,y:0,z:0},
    position: {x:0,y:0,z:0}, // NOTE: position is not render data - just informational for scene callbacks etc.
    force: {x:0,y:0,z:0},
    gravity: boolean
 }

Parameters:

Returns:

e entity