Skip to content

PhysicsMaterial

Eduard Gushchin edited this page Jul 1, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.PhysicsMaterial
Namespace Electron2D
Kind class
Category Physics

Overview

Provides an Electron2D physics material resource for 2D body collision behavior.

Syntax

public sealed class Electron2D.PhysicsMaterial : Electron2D.Resource

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: PhysicsMaterial

Body material resource with Friction, Bounce, Rough, Absorbent, validation and AOT-safe serialization metadata.

Remarks

Bounce is the Electron2D public name for restitution. The 0.1.0 Preview stores material state and serializes it for the future solver; it does not calculate contacts yet.

Thread Safety

This type is not synchronized. Create and mutate resources on the main scene thread.

Since

This type is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
Absorbent Property Gets or sets whether this material should absorb bounce in future contact solving.
Bounce Property Gets or sets the bounce coefficient used by this material.
Friction Property Gets or sets the friction coefficient used by this material.
Rough Property Gets or sets whether this material should prefer its friction in future contact solving.
Electron2D.PhysicsMaterial() Constructor Initializes a new instance of the PhysicsMaterial type.

Member Details

Absorbent

Kind: Property

public System.Boolean Absorbent { get; set; }

Summary

Gets or sets whether this material should absorb bounce in future contact solving.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current absorbent value.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsMaterial

Bounce

Kind: Property

public System.Single Bounce { get; set; }

Summary

Gets or sets the bounce coefficient used by this material.

Remarks

This is the Electron2D name for restitution.

Value

A finite value greater than or equal to 0.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsMaterial

Friction

Kind: Property

public System.Single Friction { get; set; }

Summary

Gets or sets the friction coefficient used by this material.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

A finite value greater than or equal to 0.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsMaterial

Rough

Kind: Property

public System.Boolean Rough { get; set; }

Summary

Gets or sets whether this material should prefer its friction in future contact solving.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current rough value.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsMaterial

Electron2D.PhysicsMaterial()

Kind: Constructor

public Electron2D.PhysicsMaterial()

Summary

Initializes a new instance of the PhysicsMaterial type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsMaterial

Clone this wiki locally