Difference between revisions of "R3d.Fixture:setMaterial"

From GiderosMobile
(Created page with "'''Available since:''' Gideros 2019.10<br/> '''Class:''' R3d.Body<br/> === Description === Sets the body material (bounciness, frictionCoefficient, rollingResistance). <s...")
(No difference)

Revision as of 08:47, 22 January 2020

Available since: Gideros 2019.10
Class: R3d.Body

Description

Sets the body material (bounciness, frictionCoefficient, rollingResistance).

r3d.Body:setMaterial(material)

Parameters

material: (table) the body material table

Example

local mat = shipvp.body:getMaterial()
mat.bounciness = 0.1 -- default = 0.5
mat.frictionCoefficient = 0.5 -- default = 0.3
mat.rollingResistance = 1 -- default = 0 no rolling resistance
shipvp.body:setMaterial(mat)