Skip to content

Ping Pong Linear Tween

eisclimber edited this page Feb 11, 2024 · 2 revisions

Ping Pong Linear Tween

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

Description

This is only a minimal script to allow ping-pong-tweening.

If you need something more elaborate, safe yourself the headache and buy a tween library like DOTween:)

Members

Editor Properties

  • Vector3 _offset: Offset relative to the GOs initial position.
  • float _duration: Duration of the tween for one direction. Default: 1.0f
  • bool _startOnAwake: If enabled, the tween starts automatically during Awake().

Public Methods

  • void StartTween(): Starts the tween and/or resets its progress.
  • void StopTween(bool resetPos = false): Stops the tween and resets the position if resetPos is true.
  • void ResetTween(): Resets the position of the tweened object to its initial position.

ExPresS XR Wiki

Tutorial Pages

Code Documentation

Clone this wiki locally