Search Unity

Question Spawning object on slope/inclined plane.

Discussion in 'Editor & General Support' started by Ivegotalotofquestions, Feb 18, 2021.

  1. Ivegotalotofquestions

    Ivegotalotofquestions

    Joined:
    Feb 18, 2021
    Posts:
    6
    Hi, I am facing an issue when placing object on a slope/inclined plane. User need to place an "Object A" on the plane. "Object B" will be spawned 2 meters away automatically. I used the hitpose as position and rotation for the placement of "Object A". And for "Object B" position, I used ObjectA.transform.forward * 2f.

    It works well on the horizontal plane. But if the plane is not horizontal. Object B will be floating above the ground or under the ground.

    Is there any fix for it? Any help would be appreciated!
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    As this is more a general "How to" Unity question, and not specific to AR, I'm moving this thread to the Editor & General Support forum. :)