A way to detect weight?

ROFLsnakes

L2: Junior Member
Apr 24, 2012
72
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
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
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:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
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.
 

ROFLsnakes

L2: Junior Member
Apr 24, 2012
72
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.