Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
0
Question by HungLam · Apr 26, 2018 at 06:17 AM · vrpositioningbuildingarchitecture

VR camera Positioning on a plan view of the building ???

Hello guys,

I am a building visualizer and new in Unity VR.

I am going to build an move-able VR app to visualize the interior of a building. The VR immersion can be moved from room to room with the control in Google cardboard. I would like to put another view on the scene to show the position of the VR camera on the plan of the building in order for the user can identify where the user is in the building. But I have no idea how to do in VR cardboard.

You can see the attached image for better understanding the app working.

alt text

Unity : 2017.3

VR platfrom : Google cardboard

Could any professional give me the advice for that ?

Best Regards,

vr.jpg (149.5 kB)
Comment
Add comment · Show 3
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 HungLam · Apr 27, 2018 at 03:42 AM 0
Share

Can anybody help me please ?

avatar image HungLam · May 01, 2018 at 06:19 AM 0
Share

I am still waiting for the answer

avatar image HungLam · May 03, 2018 at 07:37 AM 0
Share

Please help !

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Harinezumi · May 03, 2018 at 07:55 AM

This is basically the same as a minimap functionality. Looking up questions about minimap will help you. A rough outline on how to do it:
- have a texture with your plan
- map the user's XZ position to a position on the plan rectangle
- rotate the position marker object according to the view angle

Basically get the XZ extents of your 3D environment (map it so the low limit is 0). Then you can divide your user/camera position with the extents, which will give you the position in the textured rectangle (range [0, 1]). Then you need to map this position to the screen again using the rectangles position and size. Then you use Mathf.Atan2() to get the rotation of the camera relative to a direction (I recommend Vector3.forward), and use that angle to rotate the player marker symbol.
I guess the easiest would be to use Unity UI for this, however, 2D UIs don't look very nice in VR, they seem to "fall off" the view. Anyway, this is a good start, you can improve the visuals once you have it working.

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
avatar image
2

Answer by WorldEater · May 03, 2018 at 01:01 PM

This could be done in many different ways, I would probably compare the players x and z position with the dimensions of the virtual appartment. so playerpos / size of room to get a float between zero and one for the x and z axis. Then create a world space ui with the overview over the apartment and place the player marker using the values you calculated.


If you need examples of ui for vr check out this link: https://unity3d.com/learn/tutorials/topics/virtual-reality/user-interfaces-vr

Good luck.

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
avatar image
0

Answer by HungLam · May 08, 2018 at 04:26 AM

Thanks a lot, I got some Youtube videos about VR mini map.

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

110 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

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

How do I make my sound work in proper 3D space for VR 1 Answer

Building external program within unity project 0 Answers

GLES3 Error: Post Processing 0 Answers

How to change camera properties (i.e. FOV, plane distance) after building using keyboard - for AR headset 0 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