Unity has a built-in function for this : Vector3.Project
Vector3 AB = B - A ;
Vector3 AC = C - A ;
Vector3 AX = Vector3.Project(AC, AB);
Vector3 X = AX + A ; //How say Lutzl works!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.