Start a new topic
Solved

How to restrict size of 3d models.

I have implemented my own instant tracking example, but i want that my 3d object should not collide or overlap with real world objects.For example, if sofa is my 3d object then i don't want that 3d object to penetrate inside walls of my real world. How should i do that.


Hello,

That would be a simple sample code to do such thing

if (scaleValue > maximumScaleValue) {
    augmentation.scale = {maximumScale, maximumScale, maximumScale};
}

 

Thanks

Eva

Thanks Eva, I understood what you said. I just want to know one last thing. Lets say I am having two pillar in real world who are 20 meters apart and I am augmenting sofa 3d model as instant tracking, I want my 3d model to scale only upto 20 meters and not beyond that. Can I do that ?

 

Hello,

Depends on what exactly you mean by saying 'penetrate inside walls'. In the Instant Tracking sample, we have no reference regarding the room or its walls. So you can have augmentations move ‘through’ a wall in terms of its position, but they will not be occluded by the wall, they will always be drawn on top of the camera image. Real world objects, currently, can never be ‘over’ or in front of an augmentation.

Eva

 

Login or Signup to post a comment