<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://oxeyegames.com/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=AddBoxShape</id>
		<title>AddBoxShape - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=AddBoxShape"/>
		<link rel="alternate" type="text/html" href="http://oxeyegames.com/wiki/index.php?title=AddBoxShape&amp;action=history"/>
		<updated>2026-04-04T04:34:46Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://oxeyegames.com/wiki/index.php?title=AddBoxShape&amp;diff=407&amp;oldid=prev</id>
		<title>Jeb: Created page with '{{PhysicsMethod| physics:addBoxShape(entityId, shapeDefinition) | Adds a box shape to an entity's body. | {{MethodParam|entityId|An integer|The entity's body identifier, which is...'</title>
		<link rel="alternate" type="text/html" href="http://oxeyegames.com/wiki/index.php?title=AddBoxShape&amp;diff=407&amp;oldid=prev"/>
				<updated>2010-02-07T12:27:03Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#39;{{PhysicsMethod| physics:addBoxShape(entityId, shapeDefinition) | Adds a box shape to an entity&amp;#39;s body. | {{MethodParam|entityId|An integer|The entity&amp;#39;s body identifier, which is...&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PhysicsMethod|&lt;br /&gt;
physics:addBoxShape(entityId, shapeDefinition)&lt;br /&gt;
|&lt;br /&gt;
Adds a box shape to an entity's body.&lt;br /&gt;
|&lt;br /&gt;
{{MethodParam|entityId|An integer|The entity's body identifier, which is returned from the [[createEntity]] method.}}&lt;br /&gt;
{{MethodParam|bodyDefinition|A table|The body definition table, see below.}}&lt;br /&gt;
|&lt;br /&gt;
Returns true if the shape was added successfully.&lt;br /&gt;
}}&lt;br /&gt;
=== Shape Definition Table ===&lt;br /&gt;
&lt;br /&gt;
The shape definition table holds shape settings. In addition to the box settings, all shapes have the [[Common Shape Settings]] too.&lt;br /&gt;
&lt;br /&gt;
{| border=2 cellpadding=3 cellspacing=0 style=&amp;quot;margin: 0 0 1em 1em; border-collapse: collapse;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background:#c797d7&amp;quot;| '''Parameter'''&lt;br /&gt;
|style=&amp;quot;background:#c797d7&amp;quot;| '''Expected Type'''&lt;br /&gt;
|style=&amp;quot;background:#c797d7&amp;quot;| '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
{{MethodParam|x|A number|The centrum X coordinate of the box, in relation to the body's X coordinate. Measured in meters. Defaults to 0 (centered on the body).}}&lt;br /&gt;
{{MethodParam|y|A number|The centrum Y coordinate of the box, in relation to the body's Y coordinate. Measured in meters. Defaults to 0 (centered on the body).}}&lt;br /&gt;
{{MethodParam|width|A number|The width of the box, measured in meters. Defaults to 1.}}&lt;br /&gt;
{{MethodParam|height|A number|The height of the box, measured in meters. Defaults to 1.}}&lt;br /&gt;
{{MethodParam|angle|A number|The rotation of the box, measured in radians. Note that this is the fixed rotaion of the shape. It can't be changed later, since [[setEntityAngle]] rotates the whole body and not individual shapes. Defaults to 0.}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   local playerShapeDef = {&lt;br /&gt;
      x = 0,&lt;br /&gt;
      x = 0,&lt;br /&gt;
      width = 32 * physResolution,&lt;br /&gt;
      height = 64 * physResolution,&lt;br /&gt;
      density = 1.5,&lt;br /&gt;
      filterGroup = player.body,&lt;br /&gt;
      friction = .01,&lt;br /&gt;
   }&lt;br /&gt;
   physics:addBoxShape(player.body, playerShapeDef)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jeb</name></author>	</entry>

	</feed>