Forum

How to make invisible box (brush)?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

How to make invisible box (brush)?

Postby daemonicky » Fri May 06, 2011 5:39 am

I want to make invisible brush to do dynamic collision with player. But I do not know how to do it. I tried to set model to empty string but it removes the collisions as well. Is there another way?
User avatar
daemonicky
 
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm

Postby mh » Fri May 06, 2011 9:03 am

A clip brush should do it. Just set all textures to clip (it should be in your wad file, add one called "clip" if not) and the brush will be invisible and collide. Not sure how well that works with a moving brush model, but if your engine of choice includes .alpha support you could set alpha to 0 for the entity and get much the same effect.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby daemonicky » Fri May 06, 2011 4:47 pm

mh wrote:A clip brush should do it. Just set all textures to clip (it should be in your wad file, add one called "clip" if not) and the brush will be invisible and collide. Not sure how well that works with a moving brush model, but if your engine of choice includes .alpha support you could set alpha to 0 for the entity and get much the same effect.


It works for normal brush. But for entity brush I am getting "Entity with no valid brushes or textures on line ..." .
Maybe there is some bsp compiler which can supress it.
User avatar
daemonicky
 
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm

Postby daemonicky » Fri May 06, 2011 6:01 pm

Second approach worked. Transparency needs to be different from 0, so something like 0.01 is fine and it works. Thanks. :)
User avatar
daemonicky
 
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest