Jump to content
The Dark Mod Forums

Problem with frob box for more complex models


Recommended Posts

I created an iron grate that will be frobable, and just like Wiki says, the frob box shape is the shape of my model. The problem is that it will be pretty hard for the players to highlight it, because of the distance between the bars. Basically it looks like this:

 

https://www.dropbox.com/s/au0k3mcvs03jspf/GrateFrob.mp4

 

Adjusting frob box size doesn't help much in this case. I've tried other options like frob_peer, which works as intended, but the main problem is that even if I use a brush or model to propagate frob to my grate, it still needs to be solid for the frob raytrace to detect it. Materials like nodraw, clip or playerclip don't work, and that grate looks like it should let players shoot and throw stuff through it. I think I had similar problem while playing Biker's WIP, while with frobing an iron gate, so this is a common problem with more complex interactive models.

 

Am I missing something or it seems like we need some sort of special non-solid material like nodraw that will let everything through but collide with frob detection?

Link to post
Share on other sites

What Obs did for me in my Elixir map using a nodraw brush worked just fine.

 

If you want to let stuff pass through that create a bunch of nodraw brushes in a rough shape of the grate and with gaps etc(see below). Then make that a single FS, bind that to the grate, make the FS frobable and the grate non-frobable and then peer_frob target the grate from the FS.

 

post-496-0-91200300-1515150991_thumb.jpg

Edited by Bikerdude
  • Like 2
Link to post
Share on other sites

You mean nondrawsolid. That is sure a kind of workaround, although the main problem is lack of contact surface in the center, as that's how players will approach the grate. I might put a small cube there, but it will block any items or projectiles. I hope that's a minor thing, since it will be easier to just open the grate and throw or shoot. Ensuring consistent and error-free frobing is more important. Imagine player fleeing from a guard and having problems with opening this ;)

Link to post
Share on other sites

Feel free to extract ws2_homeagain.map from ws2_homeagain.pk4, open it in DR, search for "MontfortWestGate" using the entity list, and see how I handled this very situation.

 

Make sure you don't have caulk filtered out in DR.

 

Look at the relationship between the gate and the caulk block.

  • Like 1
Link to post
Share on other sites

Yup, that's why I wrote it.

 

By the way, with modelling it's easier just to create a collision model and export it with the mesh, instead of binding brushes and using frob_peer. Game will use your collision model for frob detection.

Link to post
Share on other sites

To clarify, maybe this is a rare problem, only related to "see-through" models like iron gates, as I can't think of anything else right now. Anyway, frob detection needs surfaces that player can collide with. In this particular case it means stuff like arrows or other small stuff will be stopped by the collision model. Not sure if we can have a material that is non-solid and works with frob detection (right now we can't). Is there a point to write that kind of functionality, if only for cases like this one? I'm not sure. That is a question for our lovely coders out there :)

Link to post
Share on other sites

To clarify, maybe this is a rare problem, only related to "see-through" models like iron gates, as I can't think of anything else right now. Anyway, frob detection needs surfaces that player can collide with. In this particular case it means stuff like arrows or other small stuff will be stopped by the collision model. Not sure if we can have a material that is non-solid and works with frob detection (right now we can't). Is there a point to write that kind of functionality, if only for cases like this one? I'm not sure. That is a question for our lovely coders out there :)

 

The code does test for solidity, but it also tests for frobability. Either condition stops the forward trace that looks for frobable items.

 

So, in theory, an object can be non-solid and frobable and still be frobbed.

 

I haven't tested this.

 

In the case of the example I gave, perhaps setting 'non-solid' on the frob peer caulk block bound to the gate would allow projectiles to pass through.

 

If that's the case, we don't need a new texture.

Link to post
Share on other sites

I tried frob_peer with clip and player_clip, and it doesn't work. I assumed frob needs player collision to work properly and it looks like I was right. I just tried it with caulk block set to solid 0 and it doesn't work. It works with solid 1.

Edited by Judith
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...