Hi, I want to create some meta game-space visual elements. In particular, I have some gui elements in my game that live is screen space. Underneath that, is the game space where my world is being rendered as the character moves around in it. As an event, I want these boulders (partciles) to fall from the top of screen OVER the gui elements. I want them to have basic physics relative to the screen coordinates and not the space coordinates. Is there any way to do this with the particle system?
Also, is there in general a way to make some render on top of gui elements?
Answer by spinaljack
May 02, 2010 at 10:04 AM
If you want stuff to fall across the screen with physics one option would be to set a second camera on the scene some place away from the play area, set the depth to a number higher than the main camera so that it renders over it, set the clear flag to depth only so you don't hide the main screen completely.
Now you can spawn a bunch of rocks in front of the second cam and the rocks will fall across the screen and not interact with the main play area.
(Incidental, this is also how I do minimaps)
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
No one has followed this question yet.
Keeping the player inside the screen?
iTween MoveAdd world coordinates Simple
Screen point to point on Plane WITHOUT Raycast?
How to get Vector3.down in world space?
Render Extremely Far off Objects