Search Unity

Use image target to position content on a ground plane

Discussion in 'Vuforia' started by JannickL, Feb 4, 2019.

  1. JannickL

    JannickL

    Joined:
    May 18, 2016
    Posts:
    72
    Hey there,
    I need to place a 3D-Human model on a ground plane. It's important that the model always appears at the same (nearly the same) position.

    What I'd do is to let the user search a ground plane in the desired area. After this he should "scan" the image target. When the image target is detected it would spawn the content and I would change the parent, new parent would be the ground plane.

    I tried it but it does'nt really work (the model is floating in the air after parenting it to the ground plane).

    Any other way to keep a real world scaled human at the same position in a room?

    Thank you :eek:)

    Greets
     
  2. sstachiw

    sstachiw

    Joined:
    Jan 5, 2019
    Posts:
    7
    You would probably just use an empty game object on the ground plane. Then write a script to instantiate a particular prefab to that gameobject transform when the target image is scanned.

    Edit: you would probably need to modify the DefaultTrackableEventHandler script that is attached to the ImageTarget. So that when "OnTrackingFound()" happens, you instantiate your prefab to the groundplane object.
     
    Last edited: Feb 6, 2019
  3. JannickL

    JannickL

    Joined:
    May 18, 2016
    Posts:
    72
    Hi there!

    I'll try it out and reach out too you again.

    Thank you
     
    sstachiw likes this.