dino-ge
    Preparing search index...

    Component that holds physics-related data for a GameObject.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    acceleration: default = ...

    Current acceleration in pixels per second squared.

    friction: number = 0.2

    Resistance to sliding.

    gameObject?: default

    Reference to the GameObject this component is attached to.

    isSensor: boolean = false

    Whether the object should detect collisions but not respond to them physically.

    isStatic: boolean = false

    Whether the object is immovable (e.g., walls).

    mass: number = 1

    Mass of the object (used for physics resolution).

    restitution: number = 0.5

    Bounciness of the object (0 = inelastic, 1 = perfectly elastic).

    velocity: default = ...

    Current velocity in pixels per second.

    Methods