Difference between revisions of "R3d.Body"

From GiderosMobile
Line 24: Line 24:
 
[[Special:MyLanguage/r3d.Body:setType|r3d.Body:setType]] ''<translate>sets the body type</translate>''<br/>
 
[[Special:MyLanguage/r3d.Body:setType|r3d.Body:setType]] ''<translate>sets the body type</translate>''<br/>
 
<!-- GIDEROSMTD:r3d.Body:setType(type) sets the body type -->
 
<!-- GIDEROSMTD:r3d.Body:setType(type) sets the body type -->
[[Special:MyLanguage/r3d.Body:enableGravity|r3d.Body:enableGravity]] ''<translate>enables or disables gravity of the body</translate>''<br/>
+
[[Special:MyLanguage/r3d.Body:enableGravity|r3d.Body:enableGravity]] ''<translate>enables or disables gravity force on the body</translate>''<br/>
<!-- GIDEROSMTD:r3d.Body:enableGravity(enable) enables or disables gravity of the body -->
+
<!-- GIDEROSMTD:r3d.Body:enableGravity(enable) enables or disables gravity force on the body -->
 
[[Special:MyLanguage/r3d.Body:setIsAllowedToSleep|r3d.Body:setIsAllowedToSleep]] ''<translate>allows or disallows a body to sleep</translate>''<br/>
 
[[Special:MyLanguage/r3d.Body:setIsAllowedToSleep|r3d.Body:setIsAllowedToSleep]] ''<translate>allows or disallows a body to sleep</translate>''<br/>
 
<!-- GIDEROSMTD:r3d.Body:setIsAllowedToSleep(allowed) allows or disallows a body to sleep -->
 
<!-- GIDEROSMTD:r3d.Body:setIsAllowedToSleep(allowed) allows or disallows a body to sleep -->

Revision as of 19:10, 22 January 2020


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 creates a new fixture
r3d.Body:destroyFixture destroys a fixture
r3d.Body:getTransform gets the body transform (position and rotation) matrix
r3d.Body:setTransform sets the body transform matrix
r3d.Body:getMaterial gets the body material
r3d.Body:setMaterial sets the body material
r3d.Body:setType sets the body type
r3d.Body:enableGravity enables or disables gravity force on the body
r3d.Body:setIsAllowedToSleep allows or disallows a body to sleep
r3d.Body:applyForce applies a force to this body
r3d.Body:applyTorque applies a torque to this body
r3d.Body:raycast performs a ray cast on the body
r3d.Body:testPointInside checks if a point is inside the body

Constants

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