Difference between revisions of "R3d.Body"

From GiderosMobile
Line 8: Line 8:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
 +
[[Special:MyLanguage/r3d.Body:createFixture|r3d.Body:createFixture]] ''<translate>create a new fixture</translate>''<br/><!-- GIDEROSMTD:r3d.Body:createFixture(shape,transform,mass) create a new fixture -->
 +
[[Special:MyLanguage/r3d.Body:destroyFixture|r3d.Body:destroyFixture]] ''<translate>destroy a fixture</translate>''<br/><!-- GIDEROSMTD:r3d.Body:destroyFixture(fixture) destroy a fixture -->
 +
[[Special:MyLanguage/r3d.Body:getTransform|r3d.Body:getTransform]] ''<translate>get the body's transform</translate>''<br/><!-- GIDEROSMTD:r3d.Body:getTransform() get the body's transform -->
 +
[[Special:MyLanguage/r3d.Body:setTransform|r3d.Body:setTransform]] ''<translate>set the body's transform</translate>''<br/><!-- GIDEROSMTD:r3d.Body:setTransform(transform) set the body's transform -->
 +
[[Special:MyLanguage/r3d.Body:getMaterial|r3d.Body:getMaterial]] ''<translate>get the body's material</translate>''<br/><!-- GIDEROSMTD:r3d.Body:getMaterial() get the body's material -->
 +
[[Special:MyLanguage/r3d.Body:setMaterial|r3d.Body:setMaterial]] ''<translate>set the body's material</translate>''<br/><!-- GIDEROSMTD:r3d.Body:setMaterial(material) set the body's material -->
 +
[[Special:MyLanguage/r3d.Body:setType|r3d.Body:setType]] ''<translate>set the body's type</translate>''<br/><!-- GIDEROSMTD:r3d.Body:setType(type) set the body's type -->
 +
[[Special:MyLanguage/r3d.Body:enableGravity|r3d.Body:enableGravity]] ''<translate>enable or disable gravity on the body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:enableGravity(enable) enable or disable gravity on the body -->
 +
[[Special:MyLanguage/r3d.Body:setIsAllowedToSleep|r3d.Body:setIsAllowedToSleep]] ''<translate>allow or disallow a body to sleep</translate>''<br/><!-- GIDEROSMTD:r3d.Body:setIsAllowedToSleep(allowed) allow or disallow a body to sleep -->
 +
[[Special:MyLanguage/r3d.Body:applyForce|r3d.Body:applyForce]] ''<translate>apply a force to this body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:applyForce(forcX,forceY,forceZ[,pointX,pointY,pointZ]) apply a force to this body -->
 +
[[Special:MyLanguage/r3d.Body:applyTorque|r3d.Body:applyTorque]] ''<translate>apply a torque to this body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:applyTorque(torqueX,torqueY,torqueZ) apply a torque to this body -->
 +
[[Special:MyLanguage/r3d.Body:raycast|r3d.Body:raycast]] ''<translate>perform a ray cast on the body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:raycast(sx,sy,sz,ex,ey,ez) perform a ray cast on the body -->
 +
[[Special:MyLanguage/r3d.Body:testPointInside|r3d.Body:testPointInside]] ''<translate>check if a point is inside the body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:testPointInside(x,y,z) check if a point is inside the body -->
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===

Revision as of 10:42, 8 October 2019


Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2019.10

Description

Methods

r3d.Body:createFixture create a new fixture
r3d.Body:destroyFixture destroy a fixture
r3d.Body:getTransform get the body's transform
r3d.Body:setTransform set the body's transform
r3d.Body:getMaterial get the body's material
r3d.Body:setMaterial set the body's material
r3d.Body:setType set the body's type
r3d.Body:enableGravity enable or disable gravity on the body
r3d.Body:setIsAllowedToSleep allow or disallow a body to sleep
r3d.Body:applyForce apply a force to this body
r3d.Body:applyTorque apply a torque to this body
r3d.Body:raycast perform a ray cast on the body
r3d.Body:testPointInside check if a point is inside the body

Constants

r3d.Body.DYNAMIC_BODY
r3d.Body.KINEMATIC_BODY
r3d.Body.STATIC_BODY