Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Ellie97 · Jul 03, 2018 at 02:16 PM · navmeshnavmeshagentvuforiaaugmented reality

Navmeshing in AR

I'm using Vuforia's ground plane stage to generate a world. On this world, there are little characters that spawn at runtime (children to the world) and are navmesh agents to the world. In the editor in play (using a standard camera without AR), this all works fine and the characters roam around as expected but when I build for android and the world is generated they spawn really high up and roam around in an area nowhere near the cube. Any help is appreciated because I'm stumped!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by lyesderouich · Jan 06, 2019 at 04:32 PM

I'm facing the same problem and i ve been googling this for some time and still no answers. As a workarround , still not tested and not a clean solution is : I already have a plane attached to my Ground Plane Surface ( or Image Target ) so i need to generate a nav mesh at runtime on that plane. Downside : Big scalled plane will take so much time to generate a nav mesh and with little scale, it may be not enough surface for your player movements.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ellie97 · Jan 06, 2019 at 05:20 PM 0
Share

Hello. I've since come up with a solution to my issue, but you probably won't like it! I'm now using AR$$anonymous$$it due to developing an app for iOS and the only solution we found was to basically break the AR.

Traditionally, the origin of the world at run time is the camera (phone). This means that the content of the world is always moving around the camera. Our workaround is to now move everything around the object rather than the camera.

There's a decent bit of info on this, try googling "scaling in AR". There's also a git page for a basic implementation of this in AR$$anonymous$$it. I'm not going to lie, it's a massive pain in the ass so you're probably better off just creating some kind of A* pathfinding manually

avatar image lyesderouich Ellie97 · Jan 06, 2019 at 07:53 PM 1
Share

Hello Again, i'm back with a solution this time which quite works well with vuforia ! If any one happen to face this problem, Unity's new Nav$$anonymous$$eshComponent which is not available with the editor (Current version : 2018.3) can be found here : https://github.com/Unity-Technologies/Nav$$anonymous$$eshComponents , and it actually works well and generate correct Nav $$anonymous$$esh Surface on runtime .

avatar image sandeepraj lyesderouich · May 22, 2019 at 05:33 AM 0
Share

HI, Navmesh is regenerated at runtime but the object position float as I move the camera How can I make the object move on navmesh without camera affecting its position

avatar image
0

Answer by tormentoarmagedoom · May 22, 2019 at 11:41 AM

Hi all.

When Instantiating objects that will act as NAv mesh agents, is 100% recommended to change its position, but also use Warp function to be sure they "go in" the namesh area.


https://docs.unity3d.com/ScriptReference/AI.NavMeshAgent.Warp.html


You need also to check the agents offset so the mesh do not appear too high or under the navmeshareara.

Ps: If post some image of scene, inspector, icheracy, etc... maybe we se something else!

Bye! :D

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sandeepraj · May 23, 2019 at 05:11 AM 0
Share

Hi - In my project agents are moving on the navmesh and the navmesh data is updating dynamically using "Nav$$anonymous$$eshComponents" according to the AR camera movement, but when the camera is moving it is also translating the agents in the level (if the camera is moving towards left all the agent move left or if the camera moving right all the agents move right) - This is happening only to the navmesh agent - Stationary objects are good

avatar image tormentoarmagedoom sandeepraj · May 23, 2019 at 07:43 AM 0
Share

Are the agents child of something? something like the player? IF agents are child of the player, as player moves, agents will also move...

avatar image selvapandigamedev95 sandeepraj · Oct 14, 2019 at 04:16 AM 0
Share

Here also same issue!!! @sandeepraj

avatar image
0

Answer by Fuongen · Jan 21, 2021 at 02:21 AM

For those who are still looking for an answer for this problem;

Click on AR Camera which is on your scene, then there is a script attached to the AR Camera which is "Vuforia Behaviour" script. It has "World Center Mode" option and "DEVICE" is selected as default. You need to change it from "DEVICE" to "SPECIFIC_TARGET" and as a target you should choose your "Image Target". After that, your Nav Mesh Agent should be working very well in AR as it works with normal camera.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

162 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

In AR project how to move Navmesh agent without getting affected by the AR camera position? 2 Answers

Navmesh, help setting position to nearest tag? (Javacript) 0 Answers

for nav mesh agent, why is it that the base offset is 1 instead of 0 as default and why is setting it to 0 make the cylinder colider move down? 0 Answers

NavMesh Agent changing Model Rotation 2 Answers

How to make the agent reach the nearest "area of an object" 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges