Class vCast.Frame
Class of Frame related functions.
框架相關的功能類別。
Inheritance
Namespace: Votanic.vXR.vCast
Assembly: Votanic.vXR.dll
Syntax
public class Frame
Methods
GetFrame()
The environment center of XR world.
XR 世界的環境中心。
Declaration
public static vCast_Frame GetFrame()
Returns
Type | Description |
---|---|
vCast_Frame |
IsTransforming()
Return true if frame is transforming.
當框架變換時傳回 true。
Declaration
public static bool IsTransforming()
Returns
Type | Description |
---|---|
System.Boolean |
Move(Vector3, Boolean, Boolean, Boolean)
Move frame to the target position.
將框架移動到目標位置。
Move(Vector3.zero, true, true, true)
Declaration
public static void Move(Vector3 position, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Target position |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
Move(Vector3, Single, Single, Single, Single, MotionParameter, TransitionMethod, Boolean, Boolean, Boolean, Boolean)
Move frame to the target position by custom custom calculation parameter and transition method.
以自定義的過場計算參數及過場方法將框架移動到目標位置。
Move(Vector3.zero, 8, 0, 0, 45, MotionParameter.Velocity, TransitionMethod.Fade, true, true, true)
Declaration
public static void Move(Vector3 position, float factor, float accel, float decel, float rotationRatio = 45F, MotionParameter parameter = MotionParameter.Velocity, TransitionMethod method = TransitionMethod.Translation, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true, bool unscaledDeltaTime = false)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Target position |
System.Single | factor | Transition factor value |
System.Single | accel | Transition accelerating value |
System.Single | decel | Transition decelerating value |
System.Single | rotationRatio | Relatively rotation angle with 1 metre movement |
MotionParameter | parameter | Transition calculation parameter |
TransitionMethod | method | Transition method |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
System.Boolean | unscaledDeltaTime | Using unscaled delta time if true |
Move(Vector3, TransitionMethod, Boolean, Boolean, Boolean, Boolean)
Move frame to the target position by custom custom transition method.
以自定義的過場方法參數將框架移動到目標位置。
Move(Vector3.zero, MotionParameter.Velocity, TransitionMethod.Fade, true, true, true)
Declaration
public static void Move(Vector3 position, TransitionMethod method, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true, bool unscaledDeltaTime = false)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Target position |
TransitionMethod | method | Transition method |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
System.Boolean | unscaledDeltaTime | Using unscaled delta time if true |
PauseTransform()
Pause the current frame transformation.
暫停目前框架的變換過程。
Declaration
public static void PauseTransform()
Rotate(Single, Boolean, Boolean, Boolean)
Rotate frame by a horizontal angle.
將框架水平旋轉。
Rotate(90, true, true, true)
Declaration
public static void Rotate(float angle, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true)
Parameters
Type | Name | Description |
---|---|---|
System.Single | angle | Rotation angle |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
Rotate(Single, Single, Single, Single, Single, MotionParameter, TransitionMethod, Boolean, Boolean, Boolean, Boolean)
Rotate frame by a horizontal angle with custom calculation parameter and transition method.
以自定義的過場計算參數及過場方法將框架水平旋轉。
Rotate(90, 8, 0, 0, 45, MotionParameter.Velocity, TransitionMethod.Fade, true, true, true)
Declaration
public static void Rotate(float angle, float factor, float accel, float decel, float rotationRatio = 45F, MotionParameter parameter = MotionParameter.Velocity, TransitionMethod method = TransitionMethod.Translation, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true, bool unscaledDeltaTime = false)
Parameters
Type | Name | Description |
---|---|---|
System.Single | angle | Rotation angle |
System.Single | factor | Transition factor value |
System.Single | accel | Transition accelerating value |
System.Single | decel | Transition decelerating value |
System.Single | rotationRatio | Relatively rotation angle with 1 metre movement |
MotionParameter | parameter | Transition calculation parameter |
TransitionMethod | method | Transition method |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
System.Boolean | unscaledDeltaTime | Using unscaled delta time if true |
Rotate(Single, TransitionMethod, Boolean, Boolean, Boolean, Boolean)
Rotate frame by a horizontal angle with custom transition method.
以自定義的過場方法將框架水平旋轉。
Rotate(90, MotionParameter.Velocity, TransitionMethod.Fade, true, true, true)
Declaration
public static void Rotate(float angle, TransitionMethod method, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true, bool unscaledDeltaTime = false)
Parameters
Type | Name | Description |
---|---|---|
System.Single | angle | Rotation angle |
TransitionMethod | method | Transition method |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
System.Boolean | unscaledDeltaTime | Using unscaled delta time if true |
SetFadeColor(Color)
Set the frame fade color of fade transition.
設定框架淡出淡入效果的顏色。
SetFadeColor(Color.black)
Declaration
public static void SetFadeColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color | color |
SetFadedDuration(Single)
Set the frame faded out duration.
設定框架淡出持續時間。
SetFadedDuration(0.1f)
Declaration
public static void SetFadedDuration(float duration)
Parameters
Type | Name | Description |
---|---|---|
System.Single | duration | Target duration |
SetFader(Color, Single, Single, Single, MotionParameter)
Set the frame fader transition effect.
設定框架淡出淡入效果。
SetFader(Color.black, 8, 0, 0, MotionParameter.Velocity)
Declaration
public void SetFader(Color color, float factor, float accel, float decel, MotionParameter parameter)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color | color | Target Color |
System.Single | factor | Transition factor value |
System.Single | accel | Transition accelerating value |
System.Single | decel | Transition decelerating value |
MotionParameter | parameter | Transition calculation parameter |
Transform(Transform, Boolean, Boolean, Boolean)
Transform frame to the target point.
將框架變換到目標地點。
Transform(transform, true, true, true)
Declaration
public static void Transform(Transform target, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | target | Target Transform |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
Transform(Transform, Single, Single, Single, Single, MotionParameter, TransitionMethod, Boolean, Boolean, Boolean, Boolean)
Transform frame to the target point by custom calculation parameter and transition method.
以自定義的過場計算參數及過場方法將框架變換到目標地點。
Transform(transform, 8, 0, 0, 45, MotionParameter.Velocity, TransitionMethod.Fade, true, true, true)
Declaration
public static void Transform(Transform target, float factor, float accel, float decel, float rotationRatio = 45F, MotionParameter parameter = MotionParameter.Velocity, TransitionMethod method = TransitionMethod.Translation, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true, bool unscaledDeltaTime = false)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | target | Target transform |
System.Single | factor | Transition factor value |
System.Single | accel | Transition accelerating value |
System.Single | decel | Transition decelerating value |
System.Single | rotationRatio | Relatively rotation angle with 1 metre movement |
MotionParameter | parameter | Transition calculation parameter |
TransitionMethod | method | Transition method |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
System.Boolean | unscaledDeltaTime | Using unscaled delta time if true |
Transform(Transform, TransitionMethod, Boolean, Boolean, Boolean, Boolean)
Transform frame to the target point by custom custom transition method.
以自定義的過場方法將框架變換到目標地點。
Transform(transform, MotionParameter.Velocity, TransitionMethod.Fade, true, true, true)
Declaration
public static void Transform(Transform target, TransitionMethod method, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true, bool unscaledDeltaTime = false)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | target | Target transform |
TransitionMethod | method | Transition method |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
System.Boolean | unscaledDeltaTime | Using unscaled delta time if true |
Transform(Vector3, Vector3, Boolean, Boolean, Boolean)
Transform frame to the target position and euler angles.
將框架變換到目標位置及角度。
Transform(Vector3.zero, Vector3.zero, true, true, true)
Declaration
public static void Transform(Vector3 position, Vector3 eulerAngles, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Target position |
UnityEngine.Vector3 | eulerAngles | Target euler angles |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
Transform(Vector3, Vector3, Single, Single, Single, Single, MotionParameter, TransitionMethod, Boolean, Boolean, Boolean, Boolean)
Transform frame to the target position and euler angles by custom calculation parameter and transition method.
以自定義的過場計算參數及過場方法將框架變換到目標位置及角度。
Transform(Vector3.zero, Vector3.zero, 8, 0, 0, 45, MotionParameter.Velocity, TransitionMethod.Fade, true, true, true)
Declaration
public static void Transform(Vector3 position, Vector3 eulerAngles, float factor, float accel, float decel, float rotationRatio = 45F, MotionParameter parameter = MotionParameter.Velocity, TransitionMethod method = TransitionMethod.Translation, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true, bool unscaledDeltaTime = false)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Target position |
UnityEngine.Vector3 | eulerAngles | Target euler angles |
System.Single | factor | Transition factor value |
System.Single | accel | Transition accelerating value |
System.Single | decel | Transition decelerating value |
System.Single | rotationRatio | Relatively rotation angle with 1 metre movement |
MotionParameter | parameter | Transition calculation parameter |
TransitionMethod | method | Transition method |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
System.Boolean | unscaledDeltaTime | Using unscaled delta time if true |
Transform(Vector3, Vector3, TransitionMethod, Boolean, Boolean, Boolean, Boolean)
Transform frame to the target position and euler angles by custom custom transition method.
以自定義的過場方法將框架變換到目標位置及角度。
Transform(Vector3.zero, Vector3.zero, MotionParameter.Velocity, TransitionMethod.Fade, true, true, true)
Declaration
public static void Transform(Vector3 position, Vector3 eulerAngles, TransitionMethod method, bool resetUserToFrame = true, bool setUserToFloor = true, bool lockUserNavigation = true, bool unscaledDeltaTime = false)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Target position |
UnityEngine.Vector3 | eulerAngles | Target euler angles |
TransitionMethod | method | Transition method |
System.Boolean | resetUserToFrame | Reset user to frame center |
System.Boolean | setUserToFloor | Adjust user height level to destination floor |
System.Boolean | lockUserNavigation | Lock user navigation when transforming |
System.Boolean | unscaledDeltaTime | Using unscaled delta time if true |
UnPauseTransform()
UnPause the current frame transformation.
取消暫停目前框架的變換過程。
Declaration
public static void UnPauseTransform()