Difference between revisions of "R3d.Body:getTransform"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
(matrix) = r3d.Body:getTransform()
 
(matrix) = r3d.Body:getTransform()
</source>
+
</syntaxhighlight>
  
 
=== Return values ===
 
=== Return values ===
Line 13: Line 13:
 
=== Example ===
 
=== Example ===
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
</source>
+
local m1 = cube.body:getTransform()
 +
cube:setMatrix(m1) -- aligns the cube shape to its body transform
 +
</syntaxhighlight>
  
 
{{R3d.Body}}
 
{{R3d.Body}}

Latest revision as of 09:19, 18 December 2025