Skip to content

Elevation Changer

eisclimber edited this page Feb 11, 2024 · 2 revisions

Elevation Changer

class in ExPresSXR.Minigames.CoinScale / Extends UnityEngine.MonoBehaviour
Component added via Component Menu

Description

This script represents one side of a scale, changing it's position as a delegate of a scale.

Make sure to add a Rigidbody (as a child) and lock it's movement/rotation. This guarantees that objects are pushed correctly (See the "Push Bases" of the Scale for reference).

Members

Editor Properties

  • float _minHeight: Min. height of this scale side. Default: -0.1f
  • float _maxHeight: Max. height of this scale side. Default: 0.1f
  • float _centerHeight: Center height of this scale side. Default: 0.0f
  • float _speed: Speed when changing elevation. Default: 0.1f
  • float _middleDeadzoneThreshold: Deadzone for reaching the neutral position. Default: 0.01f

Public Functions

  • void Activate(ScaleState state): Starts the transitions from the current to the provided state (=elevation).

Enums

  • ElevationTarget: Possible elevations, mapped to absolute delta values. Either Down = -1, Middle = 0 or Up = 1.

ExPresS XR Wiki

Tutorial Pages

Code Documentation

Clone this wiki locally