Last active
November 30, 2023 18:01
-
-
Save SamatKadyrov/c13e4f879bd6d51cf67d056db7d7deb6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class VectorOperations : MonoBehaviour | |
{ | |
[SerializeField] private Vector3 _vectorA; | |
[SerializeField] private Vector3 _vectorB; | |
[SerializeField] private Vector3 _vectorC; | |
private Vector3 _side1; | |
private Vector3 _side2; | |
private Vector3 GetNormal(Vector3 _vectorA, Vector3 _vectorB, Vector3 _vectorC) | |
{ | |
_side1 = _vectorB - _vectorA; | |
_side2 = _vectorC - _vectorA; | |
return Vector3.Cross(_side1, _side2).normalized; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment