E2 gravity/applyForce help needed

Hello, I thought of an awesome, yet easy thing to do, that is, if I get passed this problem.

I need to know the relation between gravity, mass and force in garrys mod. I want to use applyForce to disable the gravity for my entities, it is important that it is done with E2. Physical proterties tool(disable gravity) would only get me halfway.

I have tried to calculate things but all seems to fail. When my entity had the weight 1 I needed to apply about 9 force but applying 90 didnt work when it had the weight 10… I also tried calculating the acceleration using velocity but it didnt work when I tried it.

So how much force do I need to apply to disable gravity in some kind of relation to mass and gravity amount?

I’m pretty sure that the units aren’t the same as the real world.

Correct me if I’m wrong.

Again, someone correct me if what I’ve said seems incorrect.

I do believe weight=mass
I use weight tool and it changes an entity the same way E2 chip function setMass does.

Yeah, I kind of realized though. The force is applied each 1/100 second so “force = mass*gravity” as in real world can’t really work…

Have no clue how to do it now

Wiremod Forums, They are there for a reason

You do it by looking at these links.

IRL weight != mass

seriously, what? If I weight 70 kg I have the mass 70 kg haven’t I?

I’m sorry didn’t understand very much.

Thanks all but I think I have a solution I found at wiremod forums (although I’ve run into another problem)

It seems that the gravity setting doesn’t apply to props. They wont fly upwards like I do when I set it to -200 and they wont fall slower when I set it to 200.

this one works for me:


E:applyForce(vec(0,0,1)*E:mass()*(9.0132-E:vel():z()/100))

I’m not begging you guys for more help but if you think you know how to fix it, my current problem is: when I’m setting gravity towards a wall:


E:applyForce(vec(0,1,0)*E:mass()*(9.0132+E:vel():y()/100))

it works fine except when the prop actually is at the wall it’s moving towards, then it starts moving downwards have no clue how to stop that.
When I disabled gravity with physical properties instead and set gravity against a wall it worked perfectly.

(my thread at wiremod: http://www.wiremod.com/forum/expression-2-discussion-help/23147-gravity-against-wall-need-help.html)