Search Unity

Keep Gameobjects perpendicular to other objects on Plane

Discussion in 'ARCore' started by Spoof22, Jul 25, 2019.

  1. Spoof22


    May 5, 2014

    EDIT: The title says Perpendicular but it is parrallel.

    I've a problem to keep game objects parallels to other gameobjects depending the orientation on a surface.
    To explain you, the user touch the screen to place two points (A and B) on a horizontal surface.
    1. Once the two point A and B are placed on the surface, I place programmatically a point (C) who must stay parrallel, same distance, to the line of point A- B.
    I would like to achieve to get this, stay parallel in all rotation of A-B :

    I Arrive to get it parrallel if A-B is vertical, but if A-B is diagonal and more horizontal , C come over A-B.

    I Think it's a question of angle or distance, i'am stuck since 1 weeks, your helps will be really appreciate.
    Thanks you.
    Last edited: Jul 25, 2019