Search Unity

Does ARPlane support GameObject with gravity?

Discussion in 'Handheld AR' started by handsomemail, Aug 14, 2019.

  1. handsomemail

    handsomemail

    Joined:
    Aug 14, 2019
    Posts:
    1
    Hi I would like place objects with gravity on detected ARPlane, for instance, the SampleUXScene in ARFoundation-samples 2.1 which place the red sphere on the detected ARPlane. But after I add the rigidbody with gravity on the red sphere, it can not placed on the ARPlane anymore but keep falling down.
    I try to add some 3D plane as the ground for hold the red sphere, but failure.
    the code I add the 3D plane in below:

    GameObject ground = GameObject.CreatePrimitive (PrimitiveType.Plane);

    Is there anyone can help me?
    Thanks!