A way to detect weight?

Discussion in 'Mapping Questions & Discussion' started by ROFLsnakes, Oct 13, 2012.

  1. ROFLsnakes

    ROFLsnakes L2: Junior Member

    Messages:
    72
    Positive Ratings:
    5
    Was playing half-life 2 again and was curious how valve goes about causing weight to be detected,and then something moving based on the objects weight.How does it differentiate between a brick,barrel,or washing machine? Not really a tf2 question,but it is a mapping question.I figured the use could be for payload.For example,have the cart and clients set to specific weights. You can then have a door that will only open for 2 clients and a cart worth of weight.

    Thanks
     
  2. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,113
    Positive Ratings:
    6,077
    Its a func_physbox basically. the physics entities are what you want to play with here.
     
  3. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,570
    The cart actually has to be set to a weight to guide the cart into the pit. Different pit designs will require different weight values as sometimes the cart might flip over the hole or not follow through.

    As Swordfish said, do some reading into phys props. I'd link you but Interlopers doesn't seem to have anything relavent, perhaps try the snarkpit(.net) instead.

    An objects weight also affects its blunt damage when thrown at/on players.
     
    Last edited: Oct 14, 2012
  4. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    If you just want to know how it is done, like they said it is basically built into how physics entities work, mass, force limits, torque, etc. If you actually want to do something in TF2, physics are really stripped down, and may not function as necessary to do such things. The kind of thing you're talking about could be done easily with triggers and logic, though.
     
  5. ROFLsnakes

    ROFLsnakes L2: Junior Member

    Messages:
    72
    Positive Ratings:
    5
    alright cool,I made a seesaw kind of device in the hl2 part of the source engine to test some things out.Once I looked at how everything works it was obvious.