Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.07k stars 1.15k forks source link

How to clip vertical plane when it's detected? #816

Closed peterchen2001 closed 3 years ago

peterchen2001 commented 3 years ago

Hello everyone, the Plane tracking feature is very nice in ARFoundation. My question is that any way to get the bouding box coordinates once a vertical plane is found? if it's possible, what's next what i want is to clip the bouding box(such as a real existing wall) and then i can see the virtual model(such as a monster) that locates on the other side of the wall. Any clues to make these? Any code sample or code snippet? Thanks in advance.

tdmowrer commented 3 years ago

An ARPlane has a size property which can be used to generate a bounding box. The (x, y) dimensions of size refers to the local X and Z directions of the plane.

peterchen2001 commented 3 years ago

Thanks very much, I will have a try.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.