Comments (7)
Support for specifying horizontal vs vertical was added in 1.0.0-preview.21.
from arfoundation-samples.
Plane detection is either off or on. When on, it's both vertical and horizontal. We don't currently expose a way to only do horizontal detection. An enabled ARPlaneManager turns plane detection on. Disabling it turns it off.
from arfoundation-samples.
Just for a little help, I believe you can check via code through
plane.boundedPlane.Alignment == UnityEngine.Experimental.XR.PlaneAlignment.Horizontal
from arfoundation-samples.
Hi , Just a question ,
Can't we dynamically change the detection from vertical to horizontal and vice versa through code in ARFoundation ? I mean why only to be able to set in the property panel.
Plus, currently I'm building app which is doing vertical and horizontal detection , able to augment objects on detected planes BUT tracking both horizontal and vertical is causing issues , like the objects move away from their original location.
This doesn't seem to be typical normal behavior. any help??
from arfoundation-samples.
Can't we dynamically change the detection from vertical to horizontal and vice versa through code in ARFoundation ?
Sure. The ARPlaneManager
API lets you do this.
Plus, currently I'm building app which is doing vertical and horizontal detection , able to augment objects on detected planes BUT tracking both horizontal and vertical is causing issues , like the objects move away from their original location.
I need more information to diagnose a problem like that. Please log a bug with a project that reproduces the problem.
from arfoundation-samples.
Can't we dynamically change the detection from vertical to horizontal and vice versa through code in ARFoundation ?
Sure. The
ARPlaneManager
API lets you do this.Plus, currently I'm building app which is doing vertical and horizontal detection , able to augment objects on detected planes BUT tracking both horizontal and vertical is causing issues , like the objects move away from their original location.
I need more information to diagnose a problem like that. Please log a bug with a project that reproduces the problem.
Thanks for the reply.
Can a sample code or atleast bear minimum few code lines would really help. At the moment I'm not sure how to use this planedetection mode in my code.
Suppose I want to change it to any mode type , how will I use this property.
Really and seriously appreciate your help in this.
from arfoundation-samples.
Here's an example for how you might change the plane detection mode at runtime from a MonoBehaviour:
public ARPlaneManager planeManager;
void OnGUI()
{
if (GUILayout.Button("Enable Horizontal"))
{
planeManager.detectionMode |= PlaneDetectionMode.Horizontal;
}
if (GUILayout.Button("Enable Vertical"))
{
planeManager.detectionMode |= PlaneDetectionMode.Vertical;
}
if (GUILayout.Button($"{(planeManager.enabled ? "Disable" : "Enable")} plane detection"))
{
// toggle plane detection
planeManager.enabled = !planeManager.enabled;
}
}
from arfoundation-samples.
Related Issues (20)
- Can I use an iPad instead of an iPhone HOT 4
- [Bug] Low FPS results in face tracking to stop working HOT 1
- How to create ARFoundation's ARAnchor from ARKit's ARAnchor? HOT 2
- 为什么我发布成安卓程序,菜单都是灰色,用不了呢a HOT 2
- Support of MultiPeer for the visionOS platform HOT 2
- ARFoundation how to serializes ARWorldMap information for the specified region ? HOT 1
- Persist ARAnchors in Unity for Hololens 2 application HOT 1
- Stop URP Post Processing from affecting AR Camera Feed Background HOT 1
- [Android][ARCore] Crash occurs when changing to the front camera after ImageTracking has been performed even once. HOT 4
- [Bug] Link to Adam Demo executable does not work HOT 1
- [ARFoundation 6.0 with Unity 2022.3.15f1] error CS0246: The type or namespace name 'IAnalytic' could not be found (are you missing a using directive or an assembly reference?) HOT 1
- [Bug] I don't Know what is the issue but the AR core is not able to detect the plane surface and also not able to place objects I am using IQOO Neo 6 and the android version is android 14
- CPU Image from ARFaceManager HOT 1
- Is Bounding Box Available in Quest Pro or only Quest 3? HOT 1
- Xcode error in main funtion [ufw runUIApplicationMainWithArgc: argc argv: argv];
- [Bug] HOT 2
- 3D scanning using meshing / cloud of points?
- How to add a XR referenceImagelibrary through a script HOT 2
- How to unload loaded ReferenceObjectLibrary in ARTrackedObjectManager from memory
- [Bug]ARTrackedImage trackedImagesChanged value error #VisionPro HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arfoundation-samples.