Jump to content


Photo

Problem with frob box for more complex models

frob models frobbox

11 replies to this topic

#1 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1582 posts

Posted 05 January 2018 - 05:55 AM

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....f/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?



#2 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 20166 posts

Posted 05 January 2018 - 06:16 AM

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.

 

Capture.JPG


Edited by Bikerdude, 05 January 2018 - 06:21 AM.

  • Judith and Anderson like this

#3 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1582 posts

Posted 05 January 2018 - 09:06 AM

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 ;)



#4 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12676 posts

Posted 05 January 2018 - 11:21 AM

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.


  • Bikerdude and Anderson like this

#5 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1582 posts

Posted 05 January 2018 - 04:00 PM

Grayman, I know how to use the frob_peer spawngarg, I wrote that in the first post.



#6 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 20166 posts

Posted 05 January 2018 - 04:42 PM

Grayman, I know how to use the frob_peer spawngarg, I wrote that in the first post.

Ok, so have you had a look at the way he did it in his map as it should be similar to what I suggested.



#7 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1582 posts

Posted 06 January 2018 - 05:29 AM

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.



#8 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 20166 posts

Posted 06 January 2018 - 06:39 AM

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

Fair point, the advice Gman and I gave was in relation to existing models.



#9 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1582 posts

Posted 06 January 2018 - 06:54 AM

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 :)



#10 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12676 posts

Posted 07 January 2018 - 10:05 AM

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.



#11 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 20166 posts

Posted 07 January 2018 - 12:11 PM

perhaps setting 'non-solid' on the frob peer caulk block bound to the gate would allow projectiles to pass through.

Ah yes, what a novel idea!



#12 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1582 posts

Posted 07 January 2018 - 12:36 PM

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, 07 January 2018 - 12:36 PM.




Reply to this topic



  



Also tagged with one or more of these keywords: frob, models, frobbox

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users