Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Weapon render in a different layer / camera?  (Read 394 times)
bbence
Customers
Community Member
*****
Posts: 944


WWW
« on: November 28, 2011, 12:33:39 PM »

Hi,

I'm struggling with an issue, namely player weapons culling in the wall and other objects.
Is it possible to circumvent this by rendering the weapon model independently from the other objects, e.g. in a different camera? In this way the weapon would be always on top?

Thanks in advance!

Best regards,
Bence
Logged
Mithrandir_
Moderator
Community Member
*****
Posts: 349


WWW
« Reply #1 on: November 28, 2011, 04:35:16 PM »

Well, the weapon would be rendered last. I think you have to disable the Z-buffer or something so that it ends up rendered on top.
Logged

bbence
Customers
Community Member
*****
Posts: 944


WWW
« Reply #2 on: November 30, 2011, 01:58:45 PM »

Thanks for the pointers! Smiley

I found that Actor.SetOverlay does that trick very conviniently.
Logged
bbence
Customers
Community Member
*****
Posts: 944


WWW
« Reply #3 on: December 01, 2011, 02:05:13 AM »

I have to revise my statement a bit: SetOverlay does not work that well. The groups inside the mesh are also not Z sorted, therefore there are quite a lot of glitches.
The real solution (instead of enabling the SetOverlay) is to clear the z buffer right before rendering the weapon with Engine.ClearDepthBuffer
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks