Question
Project a point to a plane defined by 3 other points! You will need to use Vector addition, subtraction, normalization, Dot and Cross products to
Project a point to a plane defined by 3 other points!
You will need to use Vector addition, subtraction, normalization, Dot and Cross products to solve this problem.
Note: Experienced developers should be able to solve this in 10 to 15 minutes and in 2 lines of inlined undocumented code. But please, definining variables while adding a few more lines of code makes it far more readable and easy to debug.
The points are: (Not that you necessarily need them..)
pt 1 (-.2248946x 5.672097y 4.211876z)
pt 2 (-2.39135x 4.4073y .070989z)
pt 3 (2.697184x 6.790536y -1.885628z)
Bluept (-.976281x 9.394463y -4.840367)
Here is a visual to help aid in the idea-> need to get the Blue ball onto the plane Using game math.. Thank You!
Oh, and the clear ball on the plane's position (which should be the final answer) == (0.8102685x, 5.731036y, -4.656172z)
Scene Shaded 2D Gizmos QAll Z Persp 1 2 using System.Collections; using System.Collections.Generic; using Unity Engine; 3 4 5 6 7 8 9 10 Unity Script | O references public class DotCrossChallenge : MonoBehaviour { public Transform pti; public Transform pt2; public Transform pt3; public Transform pt_off_plane; Unity Message | O references void Start () { Vector3 pt = Vector3.zero; //project pt_off_plane to the plane defines pti, pt2, and pt3 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 pt_off_plane. localPosition pt; if ((GameObject.Find("Pt_projected").transform.position - pt).magnitudeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started