Table of Contents

Class GroundSetup

Namespace
Stride.CommunityToolkit.Engine
Assembly
Stride.CommunityToolkit.dll

The ground of a SceneSetup: a plane in 3D, a flat box in 2D, of a width and a length, with a collider from the setup's physics engine unless Collider is off. Built through Plane(Vector2?) or Visual(Vector2?).

public sealed record GroundSetup : IEquatable<GroundSetup>
Inheritance
GroundSetup
Implements

Constructors

GroundSetup(Vector2, bool)

The ground of a SceneSetup: a plane in 3D, a flat box in 2D, of a width and a length, with a collider from the setup's physics engine unless Collider is off. Built through Plane(Vector2?) or Visual(Vector2?).

public GroundSetup(Vector2 Size, bool Collider = true)

Parameters

Size Vector2

The width (X) and length (Z, or height in 2D) of the ground.

Collider bool

Whether the physics engine gives it a static collider. Without a physics engine there is none either way.

Properties

Collider

Whether the physics engine gives it a static collider. Without a physics engine there is none either way.

public bool Collider { get; init; }

Property Value

bool

Size

The width (X) and length (Z, or height in 2D) of the ground.

public Vector2 Size { get; init; }

Property Value

Vector2

Methods

Plane(Vector2?)

A ground with a collider, Default3DGroundSize unless told otherwise.

public static GroundSetup Plane(Vector2? size = null)

Parameters

size Vector2?

Returns

GroundSetup

Visual(Vector2?)

A ground to look at only: no collider even when the setup has a physics engine.

public static GroundSetup Visual(Vector2? size = null)

Parameters

size Vector2?

Returns

GroundSetup