Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Keep Gameobjects perpendicular to other objects on Plane

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

  1. Spoof22

    Spoof22

    Joined:
    May 5, 2014
    Posts:
    13
    Hello,

    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 :
    http://zupimages.net/viewer.php?id=19/30/e5nj.png

    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.
    http://zupimages.net/viewer.php?id=19/30/s4k1.png

    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