Hudaw Posted August 27, 2019 Posted August 27, 2019 Hey guys, sorry to drop in here again. I'm trying to build a hangar bay that has a one-way force field. I want to be able to leave the bay but not come back in. Essentially, I need it to be solid on the outside, but not solid on the inside. I imagined I could do this with shaders, but I'm having no luck. I put nodraw on all sides except the side I wanted the texture on, which didn't work. Then I used nodraw_solid on the sides of the brush but regular nodraw on the hangar-facing side. And that just made the whole brush solid. I'm sure I can do this with shaders, but maybe I'm just missing something? I'd appreciate any help you guys could offer here. Thanks.
Solution Artemis Posted August 28, 2019 Solution Posted August 28, 2019 You could try using a patch, since the backside of it is nonsolid. It should let you only run through it one way. NAB622 and Droidy365 like this
Hudaw Posted August 28, 2019 Author Posted August 28, 2019 You could try using a patch, since the backside of it is nonsolid. It should let you only run through it one way.Oh my god I'm an idiot. I can't believe I didn't think of that. So I could use the patch and as long as the texture is "cull twosided" then I'm fine. So I could then set it to func_usable and switch it with a regular brush covered painted with nodraw_solid if I wanted to make a locking switch. Okay, I'll try this. Thanks. God I feel like an idiot. Droidy365 likes this
Hudaw Posted August 28, 2019 Author Posted August 28, 2019 Turns out I don't need to switch it with another brush. I just set the "unlocked" field's shader to "surfaceparm nonsolid" and set the "locked" field to solid. Then they could switch against a trigger and I can just use two meshes. Ugh. This mapping thing is driving me nuts but it's so much fun. Droidy365 and Artemis like this
NAB622 Posted September 16, 2019 Posted September 16, 2019 Another alternative that might be a bit easier to deal with - you can use a nonsolid brush for the visuals, and use physics_clip on a patch mesh facing the outside to prevent entry from that direction. If you want the physics_clip to be switchable, you can attach it to a func_wall entity, and target a trigger_multiple at it. (Make sure somewhere nearby there is a brush, ideally a tiny one covered with caulk, as part of the func_wall entity or you'll get "sv_setBrushModel: null" on startup.) Every time the func_wall is fired, the wall will toggle in and out of existence. But because the visuals are attached to a nonsolid brush, they are always present. Sounds like that's what you're looking for, I think?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now