Coder Social home page Coder Social logo

Comments (5)

tdmowrer avatar tdmowrer commented on July 22, 2024 1

@kenhuang1964

do I only have access to the anchor of the plane in the code or is there some way to access the whole plane if you know what I mean.

You can access the 2D boundary points with ARPlane.boundary.

If you want to know if an arbitrary point is inside the plane, you can use a point-in-polygon algorithm, see https://en.wikipedia.org/wiki/Point_in_polygon

AR Foundation supports raycasting against planes, which might also be useful to you: https://docs.unity3d.com/Packages/[email protected]/manual/features/raycasts.html

from arfoundation-samples.

andyb-unity avatar andyb-unity commented on July 22, 2024 1

Yep. You get center, extents, and a list of boundary points. https://docs.unity3d.com/Packages/[email protected]/api/UnityEngine.XR.ARFoundation.ARPlane.html#properties

from arfoundation-samples.

kenhuang1964 avatar kenhuang1964 commented on July 22, 2024 1

Thank you @tdmowrer and @andyb-unity I really appreciate it! Happy new year!

from arfoundation-samples.

andyb-unity avatar andyb-unity commented on July 22, 2024

This is a math question. I recommend that you seek other resources on the internet to help you solve it. This question is unrelated to the AR Foundation API or the samples in this repo, so I'm going to close this issue.

from arfoundation-samples.

kenhuang1964 avatar kenhuang1964 commented on July 22, 2024

Hey @andyb-unity, I think there is a little bit of misunderstanding. For the plane detection, do I only have access to the anchor of the plane in the code or is there some way to access the whole plane if you know what I mean.

from arfoundation-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.