Show / Hide Table of Contents

Class vGear_Transformer

Transform object by uniformed acceleration motion.
以勻加速運動變換物件。

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
vGear_Transformer
Namespace: Votanic.vXR.vGear
Assembly: Votanic.vXR.dll
Syntax
[AddComponentMenu("")]
public class vGear_Transformer : MonoBehaviour

Fields

isPaused

Return true if the transformation is paused.
當變換暫停時傳回 true。

Declaration
[Tooltip("Return true if the transformation is paused.\n當變換暫停時傳回 true。")]
public bool isPaused
Field Value
Type Description
System.Boolean

isTransforming

Return true if object is transforming.
當物件變換時傳回 true。

Declaration
[Header("[Status]")]
[Tooltip("Return true if object is transforming.\n當物件變換時傳回 true。")]
public bool isTransforming
Field Value
Type Description
System.Boolean

transformation

Transformation setting.
變換設定。

Declaration
[Header("[Settings]")]
[Tooltip("Transformation setting.\n變換設定。")]
public Transformation transformation
Field Value
Type Description
Transformation

Methods

Move(Vector3, Int32, Single)

Move object.
移動物件。

Move(new Vector3(0, 0, 1))

Declaration
public void Move(Vector3 movement, int repeatTimes = 0, float gap = 0F)
Parameters
Type Name Description
UnityEngine.Vector3 movement

Position change
位置改變

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

Move(Vector3, Single, Single, Single, MotionParameter, SinglePointRepeat, Int32, Single, Boolean)

Move object by custom setting.
以自定義設定移動物件。

Move(new Vector3(0, 0, 1), 1, 0, 0, 45, 2, MotionParameter.Time, SinglePointRepeat.None)

Declaration
public void Move(Vector3 movement, float factor, float accel, float decel, MotionParameter parameter, SinglePointRepeat repeat = SinglePointRepeat.None, int repeatTimes = 0, float gap = 0F, bool unscaledDeltaTime = false)
Parameters
Type Name Description
UnityEngine.Vector3 movement

Position change
位置改變

System.Single factor

Transformation factor
變換因子

System.Single accel

Transformation accelerating value
變換加速值

System.Single decel

Transformation decelerating value
變換減速值

MotionParameter parameter

Transformation calculation parameter
變換計算參數

SinglePointRepeat repeat

Single point repeat type
單點重複類型

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

System.Boolean unscaledDeltaTime

Using unscaled delta time if true
當 true 時使用未縮放的時間變化

MoveTo(Vector3, Int32, Single)

Move object to target position.
移動物件至目標位置。

MoveTo(new Vector3(0, 0, 1))

Declaration
public void MoveTo(Vector3 position, int repeatTimes = 0, float gap = 0F)
Parameters
Type Name Description
UnityEngine.Vector3 position

Target position
目標位置

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

MoveTo(Vector3, Single, Single, Single, MotionParameter, SinglePointRepeat, Int32, Single, Boolean)

Move object to target position by custom setting.
以自定義設定移動物件至目標位置。

MoveTo(new Vector3(0, 0, 1), 1, 0, 0, 45, 2, MotionParameter.Time, SinglePointRepeat.None)

Declaration
public void MoveTo(Vector3 position, float factor, float accel, float decel, MotionParameter parameter, SinglePointRepeat repeat = SinglePointRepeat.None, int repeatTimes = 0, float gap = 0F, bool unscaledDeltaTime = false)
Parameters
Type Name Description
UnityEngine.Vector3 position

Target position
目標位置

System.Single factor

Transformation factor
變換因子

System.Single accel

Transformation accelerating value
變換加速值

System.Single decel

Transformation decelerating value
變換減速值

MotionParameter parameter

Transformation calculation parameter
變換計算參數

SinglePointRepeat repeat

Single point repeat type
單點重複類型

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

System.Boolean unscaledDeltaTime

Using unscaled delta time if true
當 true 時使用未縮放的時間變化

Pause()

Pause all transformations.
暫停所有變換過程。

Declaration
public void Pause()

Rotate(Vector3, Int32, Single)

Rotate object.
旋轉物件。

Rotate(new Vector3(0, 90, 0))

Declaration
public void Rotate(Vector3 rotation, int repeatTimes = 0, float gap = 0F)
Parameters
Type Name Description
UnityEngine.Vector3 rotation

Rotation angles
旋轉角度

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

Rotate(Vector3, Single, Single, Single, MotionParameter, SinglePointRepeat, Int32, Single, Boolean)

Rotate object by custom setting.
以自定義設定旋轉物件。

Rotate(new Vector3(0, 90, 0), 1, 0, 0, 45, 2, MotionParameter.Time, SinglePointRepeat.None)

Declaration
public void Rotate(Vector3 rotation, float factor, float accel, float decel, MotionParameter parameter, SinglePointRepeat repeat = SinglePointRepeat.None, int repeatTimes = 0, float gap = 0F, bool unscaledDeltaTime = false)
Parameters
Type Name Description
UnityEngine.Vector3 rotation

Rotation angles
旋轉角度

System.Single factor

Transformation factor
變換因子

System.Single accel

Transformation accelerating value
變換加速值

System.Single decel

Transformation decelerating value
變換減速值

MotionParameter parameter

Transformation calculation parameter
變換計算參數

SinglePointRepeat repeat

Single point repeat type
單點重複類型

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

System.Boolean unscaledDeltaTime

Using unscaled delta time if true
當 true 時使用未縮放的時間變化

RotateTo(Vector3, Int32, Single)

Rotate object to target euler angles.
旋轉物件至目標角度。

Rotate(new Vector3(0, 90, 0))

Declaration
public void RotateTo(Vector3 eulerAngles, int repeatTimes = 0, float gap = 0F)
Parameters
Type Name Description
UnityEngine.Vector3 eulerAngles

Target euler angles
目標角度

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

RotateTo(Vector3, Single, Single, Single, MotionParameter, SinglePointRepeat, Int32, Single, Boolean)

Rotate object to target euler angles by custom setting.
以自定義設定旋轉物件至目標角度。

RotateTo(new Vector3(0, 90, 0), 1, 0, 0, 45, 2, MotionParameter.Time, SinglePointRepeat.None)

Declaration
public void RotateTo(Vector3 eulerAngles, float factor, float accel, float decel, MotionParameter parameter, SinglePointRepeat repeat = SinglePointRepeat.None, int repeatTimes = 0, float gap = 0F, bool unscaledDeltaTime = false)
Parameters
Type Name Description
UnityEngine.Vector3 eulerAngles

Target euler angles
目標角度

System.Single factor

Transformation factor
變換因子

System.Single accel

Transformation accelerating value
變換加速值

System.Single decel

Transformation decelerating value
變換減速值

MotionParameter parameter

Transformation calculation parameter
變換計算參數

SinglePointRepeat repeat

Single point repeat type
單點重複類型

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

System.Boolean unscaledDeltaTime

Using unscaled delta time if true
當 true 時使用未縮放的時間變化

Scale(Vector3, Int32, Single)

Scaling object.
縮放物件。

Scale(new Vector3(1, 1, 1))

Declaration
public void Scale(Vector3 scaling, int repeatTimes = 0, float gap = 0F)
Parameters
Type Name Description
UnityEngine.Vector3 scaling

Scaling value
縮放值

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

Scale(Vector3, Single, Single, Single, MotionParameter, SinglePointRepeat, Int32, Single, Boolean)

Scaling object by custom setting.
以自定義設定縮放物件。

Scale(new Vector3(1, 1, 1), 1, 0, 0, 45, 2, MotionParameter.Time, SinglePointRepeat.None)

Declaration
public void Scale(Vector3 scaling, float factor, float accel, float decel, MotionParameter parameter, SinglePointRepeat repeat = SinglePointRepeat.None, int repeatTimes = 0, float gap = 0F, bool unscaledDeltaTime = false)
Parameters
Type Name Description
UnityEngine.Vector3 scaling

Scaling value
縮放值

System.Single factor

Transformation factor
變換因子

System.Single accel

Transformation accelerating value
變換加速值

System.Single decel

Transformation decelerating value
變換減速值

MotionParameter parameter

Transformation calculation parameter
變換計算參數

SinglePointRepeat repeat

Single point repeat type
單點重複類型

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

System.Boolean unscaledDeltaTime

Using unscaled delta time if true
當 true 時使用未縮放的時間變化

ScaleTo(Vector3, Int32, Single)

Scaling object to target scale.
縮放物件至目標大小。

ScaleTo(new Vector3(2, 2, 2))

Declaration
public void ScaleTo(Vector3 scale, int repeatTimes = 0, float gap = 0F)
Parameters
Type Name Description
UnityEngine.Vector3 scale

Target scale
目標大小

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

ScaleTo(Vector3, Single, Single, Single, MotionParameter, SinglePointRepeat, Int32, Single, Boolean)

Scaling object to target scale by custom setting.
以自定義設定縮放物件至目標大小。

ScaleTo(new Vector3(2, 2, 2), 1, 0, 0, 45, 2, MotionParameter.Time, SinglePointRepeat.None)

Declaration
public void ScaleTo(Vector3 scale, float factor, float accel, float decel, MotionParameter parameter, SinglePointRepeat repeat = SinglePointRepeat.None, int repeatTimes = 0, float gap = 0F, bool unscaledDeltaTime = false)
Parameters
Type Name Description
UnityEngine.Vector3 scale

Target scale
目標大小

System.Single factor

Transformation factor
變換因子

System.Single accel

Transformation accelerating value
變換加速值

System.Single decel

Transformation decelerating value
變換減速值

MotionParameter parameter

Transformation calculation parameter
變換計算參數

SinglePointRepeat repeat

Single point repeat type
單點重複類型

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

System.Boolean unscaledDeltaTime

Using unscaled delta time if true
當 true 時使用未縮放的時間變化

Stop()

Stop all transformations.
停止所有變換過程。

Declaration
public void Stop()

Transform(List<Coordinate>, Int32, Single)

Transform object to target coordinates.
以自定義設定將物件變換到目標座標系統。

Transform(coordinates)

Declaration
public void Transform(List<Coordinate> coordinates, int repeatTimes = 0, float gap = 0F)
Parameters
Type Name Description
System.Collections.Generic.List<Coordinate> coordinates

Target coordinates
目標座標系統

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

Transform(List<Coordinate>, Single, Single, Single, Single, Single, MotionParameter, SinglePointRepeat, Int32, Single, Boolean)

Transform object to target coordinates by custom setting.
以自定義設定將物件變換到目標座標系統。

Transform(coordinates, 1, 0, 0, 45, 2, MotionParameter.Time, SinglePointRepeat.None)

Declaration
public void Transform(List<Coordinate> coordinates, float factor, float accel, float decel, float rotationRatio, float scalingRatio, MotionParameter parameter, SinglePointRepeat repeat = SinglePointRepeat.None, int repeatTimes = 0, float gap = 0F, bool unscaledDeltaTime = false)
Parameters
Type Name Description
System.Collections.Generic.List<Coordinate> coordinates

Target coordinates
目標座標系統

System.Single factor

Transformation factor
變換因子

System.Single accel

Transformation accelerating value
變換加速值

System.Single decel

Transformation decelerating value
變換減速值

System.Single rotationRatio

Relatively rotation angle with 1 metre movement
一米移動距離的相對旋轉角度

System.Single scalingRatio

Relatively scaling size with 1 metre movement
一米移動距離的相對縮放大小

MotionParameter parameter

Transformation calculation parameter
變換計算參數

SinglePointRepeat repeat

Single point repeat type
單點重複類型

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

System.Boolean unscaledDeltaTime

Using unscaled delta time if true
當 true 時使用未縮放的時間變化

Transform(Vector3, Vector3, Vector3, Int32, Single)

Transform object.
將物件變換。

Transform(new Vector3(0, 0, 1), Vector3.zero, Vector3.zero)

Declaration
public void Transform(Vector3 movement, Vector3 rotation, Vector3 scaling, int repeatTimes = 0, float gap = 0F)
Parameters
Type Name Description
UnityEngine.Vector3 movement

Position change
位置改變

UnityEngine.Vector3 rotation

Euler angle change
角度改變

UnityEngine.Vector3 scaling

Scale change
大小改變

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

Transform(Vector3, Vector3, Vector3, Single, Single, Single, Single, Single, MotionParameter, SinglePointRepeat, Int32, Single, Boolean)

Transform object by custom setting.
以自定義設定將物件變換。

Transform(new Vector3(0, 0, 1), Vector3.zero, Vector3.zero, 1, 0, 0, 45, 2, MotionParameter.Time, SinglePointRepeat.None)

Declaration
public void Transform(Vector3 movement, Vector3 rotation, Vector3 scaling, float factor, float accel, float decel, float rotationRatio, float scalingRatio, MotionParameter parameter, SinglePointRepeat repeat = SinglePointRepeat.None, int repeatTimes = 0, float gap = 0F, bool unscaledDeltaTime = false)
Parameters
Type Name Description
UnityEngine.Vector3 movement

Position change
位置改變

UnityEngine.Vector3 rotation

Euler angle change
角度改變

UnityEngine.Vector3 scaling

Scale change
大小改變

System.Single factor

Transformation factor
變換因子

System.Single accel

Transformation accelerating value
變換加速值

System.Single decel

Transformation decelerating value
變換減速值

System.Single rotationRatio

Relatively rotation angle with 1 metre movement
一米移動距離的相對旋轉角度

System.Single scalingRatio

Relatively scaling size with 1 metre movement
一米移動距離的相對縮放大小

MotionParameter parameter

Transformation calculation parameter
變換計算參數

SinglePointRepeat repeat

Single point repeat type
單點重複類型

System.Int32 repeatTimes

Repeat action times
重複動作次數

System.Single gap

Delay between actions
動作間的延遲間隔

System.Boolean unscaledDeltaTime

Using unscaled delta time if true
當 true 時使用未縮放的時間變化

UnPause()

UnPause all transformations.
取消暫停所有變換過程。

Declaration
public void UnPause()
In This Article
Back to top Generated by DocFX