Using ApplyForceCenter() under ENT:Think(), I’m trying to create a TTT weapon that negates gravity. Essentially, the code loops ( for a, b in pairs) through a table that finds the prop in its radius, and apply force to them to negate gravity. Problem is that I can’t seem to get the correct amount of force; it’s either too much, or too little.
For example, I have tried:
phys:ApplyForceCenter(Vector(0,0,9.8) * phys:GetMass())
This doesn’t seem to do anything.
phys:ApplyForceCenter(-Vector(0,0,mass) * physenv.GetGravity())
This one cause too much force, and everything slams into the ceiling.
I’m not sure whats too wrong - could be the dodgy mass of objects in the map I’m testing on, or perhaps the tick rates, though I don’t know much about them.
If anyone could help here, I would appreciate it.
Cheers for reading, thanks in advance.