operator -(Vector3, Vector3)
Subtracts one vector from another.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Operator
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static Vector3 operator -(Vector3 a, Vector3 b)
Parameters
Returns
Type | Description |
|---|---|
| Vector3 |
Remarks
Subtracts each component of from .
baExamples
// prints (-5.0,-3.0,-1.0)using UnityEngine;using System.Collections;public class ExampleClass : MonoBehaviour{ void Example() { print(new Vector3(1, 2, 3) - new Vector3(6, 5, 4)); }}