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 user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
Keeping the player inside the screen?
camera movement in world space, but when the rotated on y axis
Converting Raycasted Point to Local Space
how to calculate screen to world point (custom)
Is there a local method for Rigidbody.constraints?