TransformExt.GetScaledVector Method (Transform, Single, Single, Single)
Gets a vector result of adding a Transform’s right, up and forward vectors scaled by x, y and z values respectively.
Namespace: UltimateXR.Extensions.Unity
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static Vector3 GetScaledVector(
this Transform self,
float x,
float y,
float z
)
Parameters
- self
- Type: Transform
Transform whose axes will be used - x
- Type: System.Single
Scale factor applied to the Transform’s right vector - y
- Type: System.Single
Scale factor applied to the Transform’s up vector - z
- Type: System.Single
Scale factor applied to the Transform’s forward vector
Return Value
Type: Vector3
Vector result of applying the scale values on the Transform axes and adding them together
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Transform. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also
Reference
TransformExt Class
GetScaledVector Overload
UltimateXR.Extensions.Unity Namespace