Class GroundSetup
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
SizeVector2The width (X) and length (Z, or height in 2D) of the ground.
ColliderboolWhether 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
Size
The width (X) and length (Z, or height in 2D) of the ground.
public Vector2 Size { get; init; }
Property Value
Methods
Plane(Vector2?)
A ground with a collider, Default3DGroundSize unless told otherwise.
public static GroundSetup Plane(Vector2? size = null)
Parameters
sizeVector2?
Returns
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
sizeVector2?