@aidinabedi/playcanvas
Version:
PlayCanvas WebGL game engine
804 lines (745 loc) • 55 kB
HTML
<!doctype html>
<html lang="en">
<head>
<title>pc.RigidBodyComponent | PlayCanvas API Reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="images/playcanvas-favicon.png">
<link href="styles/styles.css" rel="stylesheet">
<link href="styles/playcanvas-theme.css" rel="stylesheet">
<script src="scripts/interface.js"></script>
<script src="scripts/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<header>
<nav class="header-width">
<a href="/" class="header-title"><img src="images/playcanvas-manual.png"></a>
<ul class="header-menu">
<li class="user-manual"><a href="https://developer.playcanvas.com/en/user-manual/">User Manual</a></li>
<li class="tutorials"><a href="https://developer.playcanvas.com/en/tutorials">Tutorials</a></li>
<li class="forum"><a href="https://forum.playcanvas.com/" target="_blank">Forum</a></li>
<li class="api active"><a href="/api/">API Reference</a></li>
</ul>
</nav>
<div class="header-content header-page header-width">
<h1><span class="font-icon"></span>API Reference</h1>
<input id="search" class="search" type="text" placeholder="Search"></input>
</div>
</header>
<div class="container content-width">
<nav class="sidebar">
<div class="sidebarFilter">
<input id="filter-input" type="text" placeholder="Filter">
</div>
<ul>
<li id="nav-pc"><a href="pc.html">pc</a></li>
<li id="nav-pc.callbacks"><a href="pc.callbacks.html">pc.callbacks</a></li>
<li id="nav-pc.guid"><a href="pc.guid.html">pc.guid</a></li>
<li id="nav-pc.math"><a href="pc.math.html">pc.math</a></li>
<li id="nav-pc.path"><a href="pc.path.html">pc.path</a></li>
<li id="nav-pc.platform"><a href="pc.platform.html">pc.platform</a></li>
<li id="nav-pc.script"><a href="pc.script.html">pc.script</a></li>
<li id="nav-pc.string"><a href="pc.string.html">pc.string</a></li>
<li id="nav-pc.Animation"><a href="pc.Animation.html">Animation</a></li>
<li id="nav-pc.AnimationComponent"><a href="pc.AnimationComponent.html">AnimationComponent</a></li>
<li id="nav-pc.AnimationComponentSystem"><a href="pc.AnimationComponentSystem.html">AnimationComponentSystem</a></li>
<li id="nav-pc.AnimationHandler"><a href="pc.AnimationHandler.html">AnimationHandler</a></li>
<li id="nav-pc.AnimCache"><a href="pc.AnimCache.html">AnimCache</a></li>
<li id="nav-pc.AnimClip"><a href="pc.AnimClip.html">AnimClip</a></li>
<li id="nav-pc.AnimController"><a href="pc.AnimController.html">AnimController</a></li>
<li id="nav-pc.AnimCurve"><a href="pc.AnimCurve.html">AnimCurve</a></li>
<li id="nav-pc.AnimData"><a href="pc.AnimData.html">AnimData</a></li>
<li id="nav-pc.AnimSnapshot"><a href="pc.AnimSnapshot.html">AnimSnapshot</a></li>
<li id="nav-pc.AnimTarget"><a href="pc.AnimTarget.html">AnimTarget</a></li>
<li id="nav-pc.AnimTrack"><a href="pc.AnimTrack.html">AnimTrack</a></li>
<li id="nav-pc.Application"><a href="pc.Application.html">Application</a></li>
<li id="nav-pc.Asset"><a href="pc.Asset.html">Asset</a></li>
<li id="nav-pc.AssetReference"><a href="pc.AssetReference.html">AssetReference</a></li>
<li id="nav-pc.AssetRegistry"><a href="pc.AssetRegistry.html">AssetRegistry</a></li>
<li id="nav-pc.AudioHandler"><a href="pc.AudioHandler.html">AudioHandler</a></li>
<li id="nav-pc.AudioListenerComponent"><a href="pc.AudioListenerComponent.html">AudioListenerComponent</a></li>
<li id="nav-pc.AudioListenerComponentSystem"><a href="pc.AudioListenerComponentSystem.html">AudioListenerComponentSystem</a></li>
<li id="nav-pc.BasicMaterial"><a href="pc.BasicMaterial.html">BasicMaterial</a></li>
<li id="nav-pc.Batch"><a href="pc.Batch.html">Batch</a></li>
<li id="nav-pc.BatchGroup"><a href="pc.BatchGroup.html">BatchGroup</a></li>
<li id="nav-pc.BatchManager"><a href="pc.BatchManager.html">BatchManager</a></li>
<li id="nav-pc.BoundingBox"><a href="pc.BoundingBox.html">BoundingBox</a></li>
<li id="nav-pc.BoundingSphere"><a href="pc.BoundingSphere.html">BoundingSphere</a></li>
<li id="nav-pc.ButtonComponent"><a href="pc.ButtonComponent.html">ButtonComponent</a></li>
<li id="nav-pc.ButtonComponentSystem"><a href="pc.ButtonComponentSystem.html">ButtonComponentSystem</a></li>
<li id="nav-pc.CameraComponent"><a href="pc.CameraComponent.html">CameraComponent</a></li>
<li id="nav-pc.CameraComponentSystem"><a href="pc.CameraComponentSystem.html">CameraComponentSystem</a></li>
<li id="nav-pc.CollisionComponent"><a href="pc.CollisionComponent.html">CollisionComponent</a></li>
<li id="nav-pc.CollisionComponentSystem"><a href="pc.CollisionComponentSystem.html">CollisionComponentSystem</a></li>
<li id="nav-pc.Color"><a href="pc.Color.html">Color</a></li>
<li id="nav-pc.Component"><a href="pc.Component.html">Component</a></li>
<li id="nav-pc.ComponentSystem"><a href="pc.ComponentSystem.html">ComponentSystem</a></li>
<li id="nav-pc.ComponentSystemRegistry"><a href="pc.ComponentSystemRegistry.html">ComponentSystemRegistry</a></li>
<li id="nav-pc.ContactPoint"><a href="pc.ContactPoint.html">ContactPoint</a></li>
<li id="nav-pc.ContactResult"><a href="pc.ContactResult.html">ContactResult</a></li>
<li id="nav-pc.ContainerHandler"><a href="pc.ContainerHandler.html">ContainerHandler</a></li>
<li id="nav-pc.ContainerResource"><a href="pc.ContainerResource.html">ContainerResource</a></li>
<li id="nav-pc.Controller"><a href="pc.Controller.html">Controller</a></li>
<li id="nav-pc.CubemapHandler"><a href="pc.CubemapHandler.html">CubemapHandler</a></li>
<li id="nav-pc.Curve"><a href="pc.Curve.html">Curve</a></li>
<li id="nav-pc.CurveSet"><a href="pc.CurveSet.html">CurveSet</a></li>
<li id="nav-pc.ElementComponent"><a href="pc.ElementComponent.html">ElementComponent</a></li>
<li id="nav-pc.ElementComponentSystem"><a href="pc.ElementComponentSystem.html">ElementComponentSystem</a></li>
<li id="nav-pc.ElementDragHelper"><a href="pc.ElementDragHelper.html">ElementDragHelper</a></li>
<li id="nav-pc.ElementInput"><a href="pc.ElementInput.html">ElementInput</a></li>
<li id="nav-pc.ElementInputEvent"><a href="pc.ElementInputEvent.html">ElementInputEvent</a></li>
<li id="nav-pc.ElementMouseEvent"><a href="pc.ElementMouseEvent.html">ElementMouseEvent</a></li>
<li id="nav-pc.ElementTouchEvent"><a href="pc.ElementTouchEvent.html">ElementTouchEvent</a></li>
<li id="nav-pc.Entity"><a href="pc.Entity.html">Entity</a></li>
<li id="nav-pc.EventHandler"><a href="pc.EventHandler.html">EventHandler</a></li>
<li id="nav-pc.Font"><a href="pc.Font.html">Font</a></li>
<li id="nav-pc.FontHandler"><a href="pc.FontHandler.html">FontHandler</a></li>
<li id="nav-pc.ForwardRenderer"><a href="pc.ForwardRenderer.html">ForwardRenderer</a></li>
<li id="nav-pc.Frustum"><a href="pc.Frustum.html">Frustum</a></li>
<li id="nav-pc.GamePads"><a href="pc.GamePads.html">GamePads</a></li>
<li id="nav-pc.GraphicsDevice"><a href="pc.GraphicsDevice.html">GraphicsDevice</a></li>
<li id="nav-pc.GraphNode"><a href="pc.GraphNode.html">GraphNode</a></li>
<li id="nav-pc.Http"><a href="pc.Http.html">Http</a></li>
<li id="nav-pc.I18n"><a href="pc.I18n.html">I18n</a></li>
<li id="nav-pc.IndexBuffer"><a href="pc.IndexBuffer.html">IndexBuffer</a></li>
<li id="nav-pc.Keyboard"><a href="pc.Keyboard.html">Keyboard</a></li>
<li id="nav-pc.KeyboardEvent"><a href="pc.KeyboardEvent.html">KeyboardEvent</a></li>
<li id="nav-pc.Layer"><a href="pc.Layer.html">Layer</a></li>
<li id="nav-pc.LayerComposition"><a href="pc.LayerComposition.html">LayerComposition</a></li>
<li id="nav-pc.LayoutChildComponent"><a href="pc.LayoutChildComponent.html">LayoutChildComponent</a></li>
<li id="nav-pc.LayoutChildComponentSystem"><a href="pc.LayoutChildComponentSystem.html">LayoutChildComponentSystem</a></li>
<li id="nav-pc.LayoutGroupComponent"><a href="pc.LayoutGroupComponent.html">LayoutGroupComponent</a></li>
<li id="nav-pc.LayoutGroupComponentSystem"><a href="pc.LayoutGroupComponentSystem.html">LayoutGroupComponentSystem</a></li>
<li id="nav-pc.LightComponent"><a href="pc.LightComponent.html">LightComponent</a></li>
<li id="nav-pc.LightComponentSystem"><a href="pc.LightComponentSystem.html">LightComponentSystem</a></li>
<li id="nav-pc.Lightmapper"><a href="pc.Lightmapper.html">Lightmapper</a></li>
<li id="nav-pc.Mat3"><a href="pc.Mat3.html">Mat3</a></li>
<li id="nav-pc.Mat4"><a href="pc.Mat4.html">Mat4</a></li>
<li id="nav-pc.Material"><a href="pc.Material.html">Material</a></li>
<li id="nav-pc.MaterialHandler"><a href="pc.MaterialHandler.html">MaterialHandler</a></li>
<li id="nav-pc.Mesh"><a href="pc.Mesh.html">Mesh</a></li>
<li id="nav-pc.MeshInstance"><a href="pc.MeshInstance.html">MeshInstance</a></li>
<li id="nav-pc.Model"><a href="pc.Model.html">Model</a></li>
<li id="nav-pc.ModelComponent"><a href="pc.ModelComponent.html">ModelComponent</a></li>
<li id="nav-pc.ModelComponentSystem"><a href="pc.ModelComponentSystem.html">ModelComponentSystem</a></li>
<li id="nav-pc.ModelHandler"><a href="pc.ModelHandler.html">ModelHandler</a></li>
<li id="nav-pc.Morph"><a href="pc.Morph.html">Morph</a></li>
<li id="nav-pc.MorphInstance"><a href="pc.MorphInstance.html">MorphInstance</a></li>
<li id="nav-pc.MorphTarget"><a href="pc.MorphTarget.html">MorphTarget</a></li>
<li id="nav-pc.Mouse"><a href="pc.Mouse.html">Mouse</a></li>
<li id="nav-pc.MouseEvent"><a href="pc.MouseEvent.html">MouseEvent</a></li>
<li id="nav-pc.Node"><a href="pc.Node.html">Node</a></li>
<li id="nav-pc.OrientedBox"><a href="pc.OrientedBox.html">OrientedBox</a></li>
<li id="nav-pc.ParticleSystemComponent"><a href="pc.ParticleSystemComponent.html">ParticleSystemComponent</a></li>
<li id="nav-pc.ParticleSystemComponentSystem"><a href="pc.ParticleSystemComponentSystem.html">ParticleSystemComponentSystem</a></li>
<li id="nav-pc.Picker"><a href="pc.Picker.html">Picker</a></li>
<li id="nav-pc.PostEffect"><a href="pc.PostEffect.html">PostEffect</a></li>
<li id="nav-pc.PostEffectQueue"><a href="pc.PostEffectQueue.html">PostEffectQueue</a></li>
<li id="nav-pc.Quat"><a href="pc.Quat.html">Quat</a></li>
<li id="nav-pc.Ray"><a href="pc.Ray.html">Ray</a></li>
<li id="nav-pc.RaycastResult"><a href="pc.RaycastResult.html">RaycastResult</a></li>
<li id="nav-pc.RenderTarget"><a href="pc.RenderTarget.html">RenderTarget</a></li>
<li id="nav-pc.ResourceHandler"><a href="pc.ResourceHandler.html">ResourceHandler</a></li>
<li id="nav-pc.ResourceLoader"><a href="pc.ResourceLoader.html">ResourceLoader</a></li>
<li id="nav-pc.RigidBodyComponent"><a href="pc.RigidBodyComponent.html">RigidBodyComponent</a></li>
<li id="nav-pc.RigidBodyComponentSystem"><a href="pc.RigidBodyComponentSystem.html">RigidBodyComponentSystem</a></li>
<li id="nav-pc.Scene"><a href="pc.Scene.html">Scene</a></li>
<li id="nav-pc.SceneHandler"><a href="pc.SceneHandler.html">SceneHandler</a></li>
<li id="nav-pc.ScopeId"><a href="pc.ScopeId.html">ScopeId</a></li>
<li id="nav-pc.ScopeSpace"><a href="pc.ScopeSpace.html">ScopeSpace</a></li>
<li id="nav-pc.ScreenComponent"><a href="pc.ScreenComponent.html">ScreenComponent</a></li>
<li id="nav-pc.ScreenComponentSystem"><a href="pc.ScreenComponentSystem.html">ScreenComponentSystem</a></li>
<li id="nav-pc.ScriptAttributes"><a href="pc.ScriptAttributes.html">ScriptAttributes</a></li>
<li id="nav-pc.ScriptComponent"><a href="pc.ScriptComponent.html">ScriptComponent</a></li>
<li id="nav-pc.ScriptComponentSystem"><a href="pc.ScriptComponentSystem.html">ScriptComponentSystem</a></li>
<li id="nav-pc.ScriptHandler"><a href="pc.ScriptHandler.html">ScriptHandler</a></li>
<li id="nav-pc.ScriptRegistry"><a href="pc.ScriptRegistry.html">ScriptRegistry</a></li>
<li id="nav-pc.ScriptType"><a href="pc.ScriptType.html">ScriptType</a></li>
<li id="nav-pc.ScrollbarComponent"><a href="pc.ScrollbarComponent.html">ScrollbarComponent</a></li>
<li id="nav-pc.ScrollbarComponentSystem"><a href="pc.ScrollbarComponentSystem.html">ScrollbarComponentSystem</a></li>
<li id="nav-pc.ScrollViewComponent"><a href="pc.ScrollViewComponent.html">ScrollViewComponent</a></li>
<li id="nav-pc.ScrollViewComponentSystem"><a href="pc.ScrollViewComponentSystem.html">ScrollViewComponentSystem</a></li>
<li id="nav-pc.Shader"><a href="pc.Shader.html">Shader</a></li>
<li id="nav-pc.SingleContactResult"><a href="pc.SingleContactResult.html">SingleContactResult</a></li>
<li id="nav-pc.Skeleton"><a href="pc.Skeleton.html">Skeleton</a></li>
<li id="nav-pc.Skin"><a href="pc.Skin.html">Skin</a></li>
<li id="nav-pc.SkinInstance"><a href="pc.SkinInstance.html">SkinInstance</a></li>
<li id="nav-pc.Sound"><a href="pc.Sound.html">Sound</a></li>
<li id="nav-pc.SoundComponent"><a href="pc.SoundComponent.html">SoundComponent</a></li>
<li id="nav-pc.SoundComponentSystem"><a href="pc.SoundComponentSystem.html">SoundComponentSystem</a></li>
<li id="nav-pc.SoundInstance"><a href="pc.SoundInstance.html">SoundInstance</a></li>
<li id="nav-pc.SoundInstance3d"><a href="pc.SoundInstance3d.html">SoundInstance3d</a></li>
<li id="nav-pc.SoundManager"><a href="pc.SoundManager.html">SoundManager</a></li>
<li id="nav-pc.SoundSlot"><a href="pc.SoundSlot.html">SoundSlot</a></li>
<li id="nav-pc.Sprite"><a href="pc.Sprite.html">Sprite</a></li>
<li id="nav-pc.SpriteAnimationClip"><a href="pc.SpriteAnimationClip.html">SpriteAnimationClip</a></li>
<li id="nav-pc.SpriteComponent"><a href="pc.SpriteComponent.html">SpriteComponent</a></li>
<li id="nav-pc.SpriteComponentSystem"><a href="pc.SpriteComponentSystem.html">SpriteComponentSystem</a></li>
<li id="nav-pc.SpriteHandler"><a href="pc.SpriteHandler.html">SpriteHandler</a></li>
<li id="nav-pc.StandardMaterial"><a href="pc.StandardMaterial.html">StandardMaterial</a></li>
<li id="nav-pc.StencilParameters"><a href="pc.StencilParameters.html">StencilParameters</a></li>
<li id="nav-pc.Tags"><a href="pc.Tags.html">Tags</a></li>
<li id="nav-pc.Texture"><a href="pc.Texture.html">Texture</a></li>
<li id="nav-pc.TextureAtlas"><a href="pc.TextureAtlas.html">TextureAtlas</a></li>
<li id="nav-pc.TextureAtlasHandler"><a href="pc.TextureAtlasHandler.html">TextureAtlasHandler</a></li>
<li id="nav-pc.TextureHandler"><a href="pc.TextureHandler.html">TextureHandler</a></li>
<li id="nav-pc.Touch"><a href="pc.Touch.html">Touch</a></li>
<li id="nav-pc.TouchDevice"><a href="pc.TouchDevice.html">TouchDevice</a></li>
<li id="nav-pc.TouchEvent"><a href="pc.TouchEvent.html">TouchEvent</a></li>
<li id="nav-pc.TransformFeedback"><a href="pc.TransformFeedback.html">TransformFeedback</a></li>
<li id="nav-pc.Vec2"><a href="pc.Vec2.html">Vec2</a></li>
<li id="nav-pc.Vec3"><a href="pc.Vec3.html">Vec3</a></li>
<li id="nav-pc.Vec4"><a href="pc.Vec4.html">Vec4</a></li>
<li id="nav-pc.VertexAttributeDescription"><a href="pc.VertexAttributeDescription.html">VertexAttributeDescription</a></li>
<li id="nav-pc.VertexAttributeElement"><a href="pc.VertexAttributeElement.html">VertexAttributeElement</a></li>
<li id="nav-pc.VertexBuffer"><a href="pc.VertexBuffer.html">VertexBuffer</a></li>
<li id="nav-pc.VertexFormat"><a href="pc.VertexFormat.html">VertexFormat</a></li>
<li id="nav-pc.VertexIterator"><a href="pc.VertexIterator.html">VertexIterator</a></li>
<li id="nav-pc.VertexIteratorAccessor"><a href="pc.VertexIteratorAccessor.html">VertexIteratorAccessor</a></li>
<li id="nav-pc.XrInput"><a href="pc.XrInput.html">XrInput</a></li>
<li id="nav-pc.XrInputSource"><a href="pc.XrInputSource.html">XrInputSource</a></li>
<li id="nav-pc.XrManager"><a href="pc.XrManager.html">XrManager</a></li>
</ul>
</nav>
<div class='sidebarToggle'><span></span>Class List</div>
<main class="cls">
<h1>pc.RigidBodyComponent</h1>
<p class="extends">Extends: <a href="pc.Component.html">pc.Component</a></p>
<p><p>The rigidbody component, when combined with a <a href="pc.CollisionComponent.html">pc.CollisionComponent</a>, allows your
entities to be simulated using realistic physics.
A rigidbody component will fall under gravity and collide with other rigid bodies. Using scripts, you
can apply forces and impulses to rigid bodies.</p></p>
<!-- summary -->
<h1>Summary</h1>
<!--type definitions-->
<!--static properties-->
<!--static methods-->
<!--properties-->
<h3>Properties</h3>
<table class="properties">
<tr>
<td><a href="#angularDamping">angularDamping</a></td><td><p>Controls the rate at which a body loses angular velocity over time.</td>
</tr>
<tr>
<td><a href="#angularFactor">angularFactor</a></td><td><p>Scaling factor for angular movement of the body in each axis.</td>
</tr>
<tr>
<td><a href="#angularVelocity">angularVelocity</a></td><td><p>Defines the rotational speed of the body around each world axis.</td>
</tr>
<tr>
<td><a href="#friction">friction</a></td><td><p>The friction value used when contacts occur between two bodies.</td>
</tr>
<tr>
<td><a href="#group">group</a></td><td><p>The collision group this body belongs to.</td>
</tr>
<tr>
<td><a href="#linearDamping">linearDamping</a></td><td><p>Controls the rate at which a body loses linear velocity over time.</td>
</tr>
<tr>
<td><a href="#linearFactor">linearFactor</a></td><td><p>Scaling factor for linear movement of the body in each axis.</td>
</tr>
<tr>
<td><a href="#linearVelocity">linearVelocity</a></td><td><p>Defines the speed of the body in a given direction.</td>
</tr>
<tr>
<td><a href="#mask">mask</a></td><td><p>The collision mask sets which groups this body collides with.</td>
</tr>
<tr>
<td><a href="#mass">mass</a></td><td><p>The mass of the body.</td>
</tr>
<tr>
<td><a href="#restitution">restitution</a></td><td><p>Influences the amount of energy lost when two rigid bodies collide.</td>
</tr>
<tr>
<td><a href="#type">type</a></td><td><p>The rigid body type determines how the body is simulated.</td>
</tr>
</table>
<!--methods-->
<h3>Methods</h3>
<table class="properties">
<tr>
<td><a href="#activate">activate</a></td><td><p>Forcibly activate the rigid body simulation.</td>
</tr>
<tr>
<td><a href="#applyForce">applyForce</a></td><td><p>Apply an force to the body at a point.</td>
</tr>
<tr>
<td><a href="#applyImpulse">applyImpulse</a></td><td><p>Apply an impulse (instantaneous change of velocity) to the body at a point.</td>
</tr>
<tr>
<td><a href="#applyTorque">applyTorque</a></td><td><p>Apply torque (rotational force) to the body.</td>
</tr>
<tr>
<td><a href="#applyTorqueImpulse">applyTorqueImpulse</a></td><td><p>Apply a torque impulse (rotational force applied instantaneously) to the body.</td>
</tr>
<tr>
<td><a href="#isActive">isActive</a></td><td><p>Returns true if the rigid body is currently actively being simulated.</td>
</tr>
<tr>
<td><a href="#isKinematic">isKinematic</a></td><td><p>Returns true if the rigid body is of type <a href="pc.html#BODYTYPE_KINEMATIC">pc.BODYTYPE_KINEMATIC</a>.</td>
</tr>
<tr>
<td><a href="#isStatic">isStatic</a></td><td><p>Returns true if the rigid body is of type <a href="pc.html#BODYTYPE_STATIC">pc.BODYTYPE_STATIC</a>.</td>
</tr>
<tr>
<td><a href="#isStaticOrKinematic">isStaticOrKinematic</a></td><td><p>Returns true if the rigid body is of type <a href="pc.html#BODYTYPE_STATIC">pc.BODYTYPE_STATIC</a> or <a href="pc.html#BODYTYPE_KINEMATIC">pc.BODYTYPE_KINEMATIC</a>.</td>
</tr>
<tr>
<td><a href="#teleport">teleport</a></td><td><p>Teleport an entity to a new world-space position, optionally setting orientation.</td>
</tr>
</table>
<!--events-->
<h3>Events</h3>
<table class="properties">
<tr>
<td><a href="#event:collisionend">collisionend</a></td><td><p>The 'collisionend' event is fired two rigid-bodies stop touching.</td>
</tr>
<tr>
<td><a href="#event:collisionstart">collisionstart</a></td><td><p>The 'collisionstart' event is fired when two rigid bodies start touching.</td>
</tr>
<tr>
<td><a href="#event:contact">contact</a></td><td><p>The 'contact' event is fired when a contact occurs between two rigid bodies.</td>
</tr>
<tr>
<td><a href="#event:triggerenter">triggerenter</a></td><td><p>The 'triggerenter' event is fired when a rigid body enters a trigger volume.</td>
</tr>
<tr>
<td><a href="#event:triggerleave">triggerleave</a></td><td><p>The 'triggerleave' event is fired when a rigid body exits a trigger volume.</td>
</tr>
</table>
<h2>Inherited</h2>
<!--inherited methods-->
<!--inherited properties-->
<h3>Properties</h3>
<table class="properties">
<tr>
<td><a href="#enabled">enabled</a></td><td><p>Enables or disables the component.</td>
</tr>
<tr>
<td><a href="#entity">entity</a></td><td><p>The Entity that this Component is attached to.</td>
</tr>
<tr>
<td><a href="#system">system</a></td><td><p>The ComponentSystem used to create this Component.</td>
</tr>
</table>
<!--inherited static methods-->
<h3>Methods</h3>
<table class="properties">
<tr>
<td><a href="#fire">fire</a></td><td><p>Fire an event, all additional arguments are passed on to the event listener.</td>
</tr>
<tr>
<td><a href="#hasEvent">hasEvent</a></td><td><p>Test if there are any handlers bound to an event name.</td>
</tr>
<tr>
<td><a href="#off">off</a></td><td><p>Detach an event handler from an event.</td>
</tr>
<tr>
<td><a href="#on">on</a></td><td><p>Attach an event handler to an event.</td>
</tr>
<tr>
<td><a href="#once">once</a></td><td><p>Attach an event handler to an event.</td>
</tr>
</table>
<!--inherited events-->
<h1>Details</h1>
<!--type definitions-->
<!--static members-->
<!--static methods-->
<h2>Constructor</h2>
<!-- Constructor -->
<div id="RigidBodyComponent">
<h3 class="methodname">RigidBodyComponent(system, entity) <a class="font-icon" href="#RigidBodyComponent"></a></h3>
<p><p>Create a new RigidBodyComponent.</p></p>
<h4>Parameters</h4>
<table>
<tr>
<td>system</td><td><a href="pc.RigidBodyComponentSystem.html">pc.RigidBodyComponentSystem</a></td><td><p>The ComponentSystem that created this component.</p></td>
</tr>
<tr>
<td>entity</td><td><a href="pc.Entity.html">pc.Entity</a></td><td><p>The entity this component is attached to.</p></td>
</tr>
</table>
</div>
<!--properties-->
<h2>Properties</h2>
<div id="angularDamping">
<span class="property"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span><span class="property">angularDamping <a class="font-icon" href="#angularDamping"></a></span>
<p><p>Controls the rate at which a body loses angular velocity over time.
Defaults to 0.</p></p>
</div>
<div id="angularFactor">
<span class="property"><a href="pc.Vec3.html">pc.Vec3</a></span><span class="property">angularFactor <a class="font-icon" href="#angularFactor"></a></span>
<p><p>Scaling factor for angular movement of the body in each axis.
Defaults to 1 in all axes.</p></p>
</div>
<div id="angularVelocity">
<span class="property"><a href="pc.Vec3.html">pc.Vec3</a></span><span class="property">angularVelocity <a class="font-icon" href="#angularVelocity"></a></span>
<p><p>Defines the rotational speed of the body around each world axis.</p></p>
</div>
<div id="friction">
<span class="property"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span><span class="property">friction <a class="font-icon" href="#friction"></a></span>
<p><p>The friction value used when contacts occur between two bodies. A higher
value indicates more friction. Should be set in the range 0 to 1. Defaults to 0.5.</p></p>
</div>
<div id="group">
<span class="property"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span><span class="property">group <a class="font-icon" href="#group"></a></span>
<p><p>The collision group this body belongs to. Combine the group and the mask to
prevent bodies colliding with each other. Defaults to 1.</p></p>
</div>
<div id="linearDamping">
<span class="property"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span><span class="property">linearDamping <a class="font-icon" href="#linearDamping"></a></span>
<p><p>Controls the rate at which a body loses linear velocity over time.
Defaults to 0.</p></p>
</div>
<div id="linearFactor">
<span class="property"><a href="pc.Vec3.html">pc.Vec3</a></span><span class="property">linearFactor <a class="font-icon" href="#linearFactor"></a></span>
<p><p>Scaling factor for linear movement of the body in each axis.
Defaults to 1 in all axes.</p></p>
</div>
<div id="linearVelocity">
<span class="property"><a href="pc.Vec3.html">pc.Vec3</a></span><span class="property">linearVelocity <a class="font-icon" href="#linearVelocity"></a></span>
<p><p>Defines the speed of the body in a given direction.</p></p>
</div>
<div id="mask">
<span class="property"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span><span class="property">mask <a class="font-icon" href="#mask"></a></span>
<p><p>The collision mask sets which groups this body collides with. It is a bitfield
of 16 bits, the first 8 bits are reserved for engine use. Defaults to 65535.</p></p>
</div>
<div id="mass">
<span class="property"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span><span class="property">mass <a class="font-icon" href="#mass"></a></span>
<p><p>The mass of the body. This is only relevant for <a href="pc.html#BODYTYPE_DYNAMIC">pc.BODYTYPE_DYNAMIC</a>
bodies, other types have infinite mass. Defaults to 1.</p></p>
</div>
<div id="restitution">
<span class="property"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span><span class="property">restitution <a class="font-icon" href="#restitution"></a></span>
<p><p>Influences the amount of energy lost when two rigid bodies collide. The
calculation multiplies the restitution values for both colliding bodies. A multiplied value of 0 means
that all energy is lost in the collision while a value of 1 means that no energy is lost. Should be
set in the range 0 to 1. Defaults to 0.</p></p>
</div>
<div id="type">
<span class="property"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span><span class="property">type <a class="font-icon" href="#type"></a></span>
<p><p>The rigid body type determines how the body is simulated. Can be:</p>
<ul>
<li><a href="pc.html#BODYTYPE_STATIC">pc.BODYTYPE_STATIC</a>: infinite mass and cannot move.</li>
<li><a href="pc.html#BODYTYPE_DYNAMIC">pc.BODYTYPE_DYNAMIC</a>: simulated according to applied forces.</li>
<li><a href="pc.html#BODYTYPE_KINEMATIC">pc.BODYTYPE_KINEMATIC</a>: infinite mass and does not respond to forces but can still be moved by setting their velocity or position.</li>
</ul>
<p>Defaults to pc.BODYTYPE_STATIC.</p></p>
</div>
<!--methods-->
<h2>Methods</h2>
<div id="activate">
<h3 class="methodname">activate() <a class="font-icon" href="#activate"></a></h3>
<p><p>Forcibly activate the rigid body simulation.</p></p>
</div>
<div id="applyForce">
<h3 class="methodname">applyForce(x, [y], [z], [px], [py], [pz]) <a class="font-icon" href="#applyForce"></a></h3>
<p><p>Apply an force to the body at a point. By default, the force is applied at the origin of the
body. However, the force can be applied at an offset this point by specifying a world space vector from
the body's origin to the point of application. This function has two valid signatures. You can either
specify the force (and optional relative point) via 3D-vector or numbers.</p></p>
<pre><code class="javascript">// Apply an approximation of gravity at the body's center
this.entity.rigidbody.applyForce(0, -10, 0);</code></pre>
<pre><code class="javascript">// Apply an approximation of gravity at 1 unit down the world Z from the center of the body
this.entity.rigidbody.applyForce(0, -10, 0, 0, 0, 1);</code></pre>
<pre><code class="javascript">// Apply a force at the body's center
// Calculate a force vector pointing in the world space direction of the entity
var force = this.entity.forward.clone().scale(100);
// Apply the force
this.entity.rigidbody.applyForce(force);</code></pre>
<pre><code class="javascript">// Apply a force at some relative offset from the body's center
// Calculate a force vector pointing in the world space direction of the entity
var force = this.entity.forward.clone().scale(100);
// Calculate the world space relative offset
var relativePos = new pc.Vec3();
var childEntity = this.entity.findByName('Engine');
relativePos.sub2(childEntity.getPosition(), this.entity.getPosition());
// Apply the force
this.entity.rigidbody.applyForce(force, relativePos);</code></pre>
<h4>Parameters</h4>
<table>
<tr>
<td>x</td><td><a href="pc.Vec3.html">pc.Vec3</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>A 3-dimensional vector representing the force in world-space or
the x-component of the force in world-space.</p></td>
</tr>
<tr>
<td>y</td><td><a href="pc.Vec3.html">pc.Vec3</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>An optional 3-dimensional vector representing the relative point at
which to apply the impulse in world-space or the y-component of the force in world-space.</p></td>
</tr>
<tr>
<td>z</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The z-component of the force in world-space.</p></td>
</tr>
<tr>
<td>px</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The x-component of a world-space offset from the body's position where the force is applied.</p></td>
</tr>
<tr>
<td>py</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The y-component of a world-space offset from the body's position where the force is applied.</p></td>
</tr>
<tr>
<td>pz</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The z-component of a world-space offset from the body's position where the force is applied.</p></td>
</tr>
</table>
</div>
<div id="applyImpulse">
<h3 class="methodname">applyImpulse(x, [y], [z], [px], [py], [pz]) <a class="font-icon" href="#applyImpulse"></a></h3>
<p><p>Apply an impulse (instantaneous change of velocity) to the body at a point.
This function has two valid signatures. You can either specify the impulse (and optional relative
point) via 3D-vector or numbers.</p></p>
<pre><code class="javascript">// Apply an impulse along the world-space positive y-axis at the entity's position.
var impulse = new pc.Vec3(0, 10, 0);
entity.rigidbody.applyImpulse(impulse);</code></pre>
<pre><code class="javascript">// Apply an impulse along the world-space positive y-axis at 1 unit down the positive
// z-axis of the entity's local-space.
var impulse = new pc.Vec3(0, 10, 0);
var relativePoint = new pc.Vec3(0, 0, 1);
entity.rigidbody.applyImpulse(impulse, relativePoint);</code></pre>
<pre><code class="javascript">// Apply an impulse along the world-space positive y-axis at the entity's position.
entity.rigidbody.applyImpulse(0, 10, 0);</code></pre>
<pre><code class="javascript">// Apply an impulse along the world-space positive y-axis at 1 unit down the positive
// z-axis of the entity's local-space.
entity.rigidbody.applyImpulse(0, 10, 0, 0, 0, 1);</code></pre>
<h4>Parameters</h4>
<table>
<tr>
<td>x</td><td><a href="pc.Vec3.html">pc.Vec3</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>A 3-dimensional vector representing the impulse in world-space or
the x-component of the impulse in world-space.</p></td>
</tr>
<tr>
<td>y</td><td><a href="pc.Vec3.html">pc.Vec3</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>An optional 3-dimensional vector representing the relative point at
which to apply the impulse in the local-space of the entity or the y-component of the impulse to
apply in world-space.</p></td>
</tr>
<tr>
<td>z</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The z-component of the impulse to apply in world-space.</p></td>
</tr>
<tr>
<td>px</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The x-component of the point at which to apply the impulse in the local-space of the entity.</p></td>
</tr>
<tr>
<td>py</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The y-component of the point at which to apply the impulse in the local-space of the entity.</p></td>
</tr>
<tr>
<td>pz</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The z-component of the point at which to apply the impulse in the local-space of the entity.</p></td>
</tr>
</table>
</div>
<div id="applyTorque">
<h3 class="methodname">applyTorque(x, [y], [z]) <a class="font-icon" href="#applyTorque"></a></h3>
<p><p>Apply torque (rotational force) to the body. This function has two valid signatures.
You can either specify the torque force with a 3D-vector or with 3 numbers.</p></p>
<pre><code class="javascript">// Apply via vector
var torque = new pc.Vec3(0, 10, 0);
entity.rigidbody.applyTorque(torque);</code></pre>
<pre><code class="javascript">// Apply via numbers
entity.rigidbody.applyTorque(0, 10, 0);</code></pre>
<h4>Parameters</h4>
<table>
<tr>
<td>x</td><td><a href="pc.Vec3.html">pc.Vec3</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>A 3-dimensional vector representing the torque force in world-space or
the x-component of the torque force in world-space.</p></td>
</tr>
<tr>
<td>y</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The y-component of the torque force in world-space.</p></td>
</tr>
<tr>
<td>z</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The z-component of the torque force in world-space.</p></td>
</tr>
</table>
</div>
<div id="applyTorqueImpulse">
<h3 class="methodname">applyTorqueImpulse(x, [y], [z]) <a class="font-icon" href="#applyTorqueImpulse"></a></h3>
<p><p>Apply a torque impulse (rotational force applied instantaneously) to the body.
This function has two valid signatures. You can either specify the torque force with a 3D-vector
or with 3 numbers.</p></p>
<pre><code class="javascript">// Apply via vector
var torque = new pc.Vec3(0, 10, 0);
entity.rigidbody.applyTorqueImpulse(torque);</code></pre>
<pre><code class="javascript">// Apply via numbers
entity.rigidbody.applyTorqueImpulse(0, 10, 0);</code></pre>
<h4>Parameters</h4>
<table>
<tr>
<td>x</td><td><a href="pc.Vec3.html">pc.Vec3</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>A 3-dimensional vector representing the torque impulse in world-space or
the x-component of the torque impulse in world-space.</p></td>
</tr>
<tr>
<td>y</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The y-component of the torque impulse in world-space.</p></td>
</tr>
<tr>
<td>z</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The z-component of the torque impulse in world-space.</p></td>
</tr>
</table>
</div>
<div id="isActive">
<h3 class="methodname">isActive() <a class="font-icon" href="#isActive"></a></h3>
<p><p>Returns true if the rigid body is currently actively being simulated. I.e. Not 'sleeping'.</p></p>
<h4>Returns</h4>
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a> <p>True if the body is active.</p>
</div>
<div id="isKinematic">
<h3 class="methodname">isKinematic() <a class="font-icon" href="#isKinematic"></a></h3>
<p><p>Returns true if the rigid body is of type <a href="pc.html#BODYTYPE_KINEMATIC">pc.BODYTYPE_KINEMATIC</a>.</p></p>
<h4>Returns</h4>
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a> <p>True if kinematic.</p>
</div>
<div id="isStatic">
<h3 class="methodname">isStatic() <a class="font-icon" href="#isStatic"></a></h3>
<p><p>Returns true if the rigid body is of type <a href="pc.html#BODYTYPE_STATIC">pc.BODYTYPE_STATIC</a>.</p></p>
<h4>Returns</h4>
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a> <p>True if static.</p>
</div>
<div id="isStaticOrKinematic">
<h3 class="methodname">isStaticOrKinematic() <a class="font-icon" href="#isStaticOrKinematic"></a></h3>
<p><p>Returns true if the rigid body is of type <a href="pc.html#BODYTYPE_STATIC">pc.BODYTYPE_STATIC</a> or <a href="pc.html#BODYTYPE_KINEMATIC">pc.BODYTYPE_KINEMATIC</a>.</p></p>
<h4>Returns</h4>
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a> <p>True if static or kinematic.</p>
</div>
<div id="teleport">
<h3 class="methodname">teleport(x, y, [z], [rx], [ry], [rz]) <a class="font-icon" href="#teleport"></a></h3>
<p><p>Teleport an entity to a new world-space position, optionally setting orientation. This function
should only be called for rigid bodies that are dynamic. This function has three valid signatures.
The first takes a 3-dimensional vector for the position and an optional 3-dimensional vector for Euler rotation.
The second takes a 3-dimensional vector for the position and an optional quaternion for rotation.
The third takes 3 numbers for the position and an optional 3 numbers for Euler rotation.</p></p>
<pre><code class="javascript">// Teleport the entity to the origin
entity.rigidbody.teleport(pc.Vec3.ZERO);</code></pre>
<pre><code class="javascript">// Teleport the entity to the origin
entity.rigidbody.teleport(0, 0, 0);</code></pre>
<pre><code class="javascript">// Teleport the entity to world-space coordinate [1, 2, 3] and reset orientation
var position = new pc.Vec3(1, 2, 3);
entity.rigidbody.teleport(position, pc.Vec3.ZERO);</code></pre>
<pre><code class="javascript">// Teleport the entity to world-space coordinate [1, 2, 3] and reset orientation
entity.rigidbody.teleport(1, 2, 3, 0, 0, 0);</code></pre>
<h4>Parameters</h4>
<table>
<tr>
<td>x</td><td><a href="pc.Vec3.html">pc.Vec3</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>A 3-dimensional vector holding the new position or the new position x-coordinate.</p></td>
</tr>
<tr>
<td>y</td><td><a href="pc.Vec3.html">pc.Vec3</a>, <a href="pc.Quat.html">pc.Quat</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>A 3-dimensional vector or quaternion holding the new rotation or the new
position y-coordinate.</p></td>
</tr>
<tr>
<td>z</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The new position z-coordinate.</p></td>
</tr>
<tr>
<td>rx</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The new Euler x-angle value.</p></td>
</tr>
<tr>
<td>ry</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The new Euler y-angle value.</p></td>
</tr>
<tr>
<td>rz</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></td><td><p>The new Euler z-angle value.</p></td>
</tr>
</table>
</div>
<!--events-->
<h2>Events</h2>
<div id="event:collisionend">
<h3 class="methodname">collisionend <a class="font-icon" href="#event:collisionend"></a></h3>
<p><p>The 'collisionend' event is fired two rigid-bodies stop touching.</p></p>
<h4>Parameters</h4>
<table>
<tr>
<td>other</td><td><a href="pc.Entity.html">pc.Entity</a></td><td><p>The <a href="pc.Entity.html">pc.Entity</a> that stopped touching this rigid body.</p></td>
</tr>
</table>
</div>
<div id="event:collisionstart">
<h3 class="methodname">collisionstart <a class="font-icon" href="#event:collisionstart"></a></h3>
<p><p>The 'collisionstart' event is fired when two rigid bodies start touching.</p></p>
<h4>Parameters</h4>
<table>
<tr>
<td>result</td><td><a href="pc.ContactResult.html">pc.ContactResult</a></td><td><p>Details of the contact between the two rigid bodies.</p></td>
</tr>
</table>
</div>
<div id="event:contact">
<h3 class="methodname">contact <a class="font-icon" href="#event:contact"></a></h3>
<p><p>The 'contact' event is fired when a contact occurs between two rigid bodies.</p></p>
<h4>Parameters</h4>
<table>
<tr>
<td>result</td><td><a href="pc.ContactResult.html">pc.ContactResult</a></td><td><p>Details of the contact between the two rigid bodies.</p></td>
</tr>
</table>
</div>
<div id="event:triggerenter">
<h3 class="methodname">triggerenter <a class="font-icon" href="#event:triggerenter"></a></h3>
<p><p>The 'triggerenter' event is fired when a rigid body enters a trigger volume.</p></p>
<h4>Parameters</h4>
<table>
<tr>
<td>other</td><td><a href="pc.Entity.html">pc.Entity</a></td><td><p>The <a href="pc.Entity.html">pc.Entity</a> with trigger volume that this rigidbody entered.</p></td>
</tr>
</table>
</div>
<div id="event:triggerleave">
<h3 class="methodname">triggerleave <a class="font-icon" href="#event:triggerleave"></a></h3>
<p><p>The 'triggerleave' event is fired when a rigid body exits a trigger volume.</p></p>
<h4>Parameters</h4>
<table>
<tr>
<td>other</td><td><a href="pc.Entity.html">pc.Entity</a></td><td><p>The <a href="pc.Entity.html">pc.Entity</a> with trigger volume that this rigidbody exited.</p></td>
</tr>
</table>
</div>
<h2>Inherited</h2>
<!--inherited properties-->
<h2>Properties</h2>
<div id="enabled">
<span class="property"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span><span class="property">enabled <a class="font-icon" href="#enabled"></a></span>
<p><p>Enables or disables the component.</p></p>
</div>
<div id="entity">
<span class="property"><a href="pc.Entity.html">pc.Entity</a></span><span class="property">entity <a class="font-icon" href="#entity"></a></span>
<p><p>The Entity that this Component is attached to.</p></p>
</div>
<div id="system">
<span class="property"><a href="pc.ComponentSystem.html">pc.ComponentSystem</a></span><span class="property">system <a class="font-icon" href="#system"></a></span>
<p><p>The ComponentSystem used to create this Component.</p></p>
</div>
<!--inherited methods-->
<h2>Methods</h2>
<div id="fire">
<h3 class="methodname">fire(name, [arg1], [arg2], [arg3], [arg4], [arg5], [arg6], [arg7], [arg8]) <a class="font-icon" href="#fire"></a></h3>
<p><p>Fire an event, all additional arguments are passed on to the event listener.</p></p>
<pre><code class="javascript">obj.fire('test', 'This is the message');</code></pre>
<h4>Parameters</h4>
<table>
<tr>
<td>name</td><td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a></td><td><p>Name of event to fire.</p></td>
</tr>
<tr>
<td>arg1</td><td><a href="#">*</a></td><td><p>First argument that is passed to the event handler.</p></td>
</tr>
<tr>
<td>arg2</td><td><a href="#">*</a></td><td><p>Second argument that is passed to the event handler.</p></td>
</tr>
<tr>
<td>arg3</td><td><a href="#">*</a></td><td><p>Third argument that is passed to the event handler.</p></td>
</tr>
<tr>
<td>arg4</td><td><a href="#">*</a></td><td><p>Fourth argument that is passed to the event handler.</p></td>
</tr>
<tr>
<td>arg5</td><td><a href="#">*</a></td><td><p>Fifth argument that is passed to the event handler.</p></td>
</tr>
<tr>
<td>arg6</td><td><a href="#">*</a></td><td><p>Sixth argument that is passed to the event handler.</p></td>
</tr>
<tr>
<td>arg7</td><td><a href="#">*</a></td><td><p>Seventh argument that is passed to the event handler.</p></td>
</tr>
<tr>
<td>arg8</td><td><a href="#">*</a></td><td><p>Eighth argument that is passed to the event handler.</p></td>
</tr>
</table>
<h4>Returns</h4>
<a href="pc.EventHandler.html">pc.EventHandler</a> <p>Self for chaining.</p>
</div>
<div id="hasEvent">
<h3 class="methodname">hasEvent(name) <a class="font-icon" href="#hasEvent">Ɇ