Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[HELP] Arichmetic problem in 3d space

Discussion in 'Editor & General Support' started by Fasox, Nov 29, 2012.

  1. Fasox

    Fasox

    Joined:
    Aug 8, 2012
    Posts:
    7
    Hello guys ... i came here with this problem,


    i have the dots G - C - T where....
    C is the center of the cirunference
    T is a random point inside the circunference
    G is another random point inside the circunference.

    I want to get the PQ vector3 where , PQ is a Proyection of CT over the semi rect R with origin in G parallel to vector(CT) and with the same direction.

    My question is... how i cant get this?
     
  2. tomvds

    tomvds

    Joined:
    Oct 10, 2008
    Posts:
    1,028
    Untested, just from the head:

    CT = T - C
    GC = C - G
    P = G + Vector3.Project(GC, CT)
    Q = P + CT