PhysicsMaterialResource

A resource type used to define the properties of physics materials, such as friction and restitution.

Constructors

Link copied to clipboard
constructor(staticFriction: Float = 0.6f, dynamicFriction: Float = 0.6f, restitution: Float = 0.0f)

Constructs a PhysicsMaterialResource by specifying parameters.

Functions

Link copied to clipboard
open override fun close()

You need to manually release the resource to free the memory it occupies.

Link copied to clipboard
fun getDynamicFriction(): Float

Gets the dynamic friction of the physics material.

Link copied to clipboard
fun getRestitution(): Float

Gets the restitution of the physics material.

Link copied to clipboard
fun getStaticFriction(): Float

Gets the static friction of the physics material.

Link copied to clipboard
fun setDynamicFriction(dynamicFriction: Float)

Sets the dynamic friction of the physics material.

Link copied to clipboard
fun setRestitution(restitution: Float)

Sets the restitution of the physics material.

Link copied to clipboard
fun setStaticFriction(staticFriction: Float)

Sets the static friction of the physics material.