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 abi-kr01 · Feb 13, 2019 at 06:02 AM · cameracanvasvirtualrealityoverlay

Is there a way to render models over the UI

i have VR scene, where i have a cube inside a canvas with render mode ->World space alt text

I need to rotate the cube (or any other mesh) that cube over the UI.

One issue i am facing is the mesh and UI are going inside each other.

 There are two solution that i can think of now is 
  1)Move the cube in z axis but that cant be done as it can be any model which means it can have different height and length.
 2) Use Two camera and use layer and culling mask 

but i want to avoid both the solution,Now what can be done to fix this issue i just want that object to be rendered above the UI even if both ui and object are at same position

vr-ui-camera.png (145.9 kB)
Comment
Add comment · Show 1
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 Rainsha · Feb 13, 2019 at 09:08 AM 0
Share

You could try setting the render queue on either your object or the UI. https://docs.unity3d.com/ScriptReference/$$anonymous$$aterial-renderQueue.html

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by xxmariofer · Feb 13, 2019 at 08:42 AM

hello, can you test using change the render mode to screen space - camera? that will make the canvas to scale to always fit the camera size and you can adjust the plane distance for making sure its always behind.

Comment
Add comment · Show 2 · 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 abi-kr01 · Feb 13, 2019 at 09:57 AM 0
Share

We need click on those UI so we can not go for screen space as it will not take the click in vr .I know for mesh we have some shader that will make object render on top of any other mesh even if that mesh is inside any other mesh.Hoping something like i can find for UI also

avatar image xxmariofer abi-kr01 · Feb 13, 2019 at 10:11 AM 0
Share

oh i see, i have never worked with vr so wasnt thinking of that posibility. may i ask why not go with your first approach of offsetting the object? you say that multiple objects can be inside the canvas, but you can offset it dynamically, since you can access the (for this example) boxcollider, and access the boxcollider.size, and offessting for example the boxcollider.size

 float offset = boxObject.GetComponent<>().size.z / 2;
 canvasPosition += new Vector3(0,0, offset);

if the objects doesnt have collider you can access the renderer component and the bounds property that has $$anonymous$$ and max subpropertys that will give you the max and $$anonymous$$ point of the renderer

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

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

Related Questions

Double Screen Camera (VR , Cardboard vision) Same Camera Side by Side 0 Answers

Google Cardboard Cannot See Reticle 1 Answer

Set Image or Sprite to not ReadPixel 0 Answers

Screen Space - Camera to Screen Space - Overlay switch issue 0 Answers

Canvas screenpspace overlay for a particular camera 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