How does applyForce/linearVelocity work in physics

I understand it accelerates the object when you apply the force and the linearVelocity sets the velocity of the object butttttt…

Is it pixel for pixel? If not what is it?

Example: self.ball.linearVelocity = vec2(200,0)

Does the ball go east at a rate of 200 pixels/ second or what is the conversion from velocity to pixels if there is one

The user and all related content has been deleted.

@Invader3rZIM I believe it’s pixels per second. As for …vec2(200,0), It moves the object to the right at 200 pps. Using vec2(200,200), that moves it 200 pps to the right and up.

@NatTheCoder He didn’t post any code that needed the 3 tildes.

@dave1707 the sarcasm is overwhelming

@NatTheCoder he posted one line of code to show an example. You shouldn’t need to copy and test that to know what he means, and even if you did it wouldn’t run, so I don’t see why he would need to do it with the ~~~

@jakAttack the thing about Nat is he’s at the point in his life where he needs to be part of the crowd. He logs in and he reviews the latest topics, then posts whatever he can think of. Sometimes to correct (unnecessarily), and sometimes to congratulate, and just as much to post worthless comments to feel like he’s part of the discussion. He wants to be liked and he wants the attention and he wants to feel like he’s a part of something…every 8 year old feels this way :wink: @natthecoder it’s real annoying your troll of a posting habit…please restrain yourself and cut it out please :-?

Ok, that is exactly what I do and I think, @Invad3rZIM, except what I post is related to Codea or word of thanks. Nat does the same thing, except sometimes he does what u do. But he is 13, so u may be a hint of right.

I’m assuming there’s a typo there. Otherwise, I can’t say that i troll like he does


Just to get back on topic… I think it’s 200 metre/second, but there is a setting in physics that says how many meters per pixel. It defaults to 32 metres is 1 pixel. You can change that scale with

physics.pixelToMeterRatio( ptmRatio )

So you can do big physics on smaller screens… or tiny physics on big screens. Of course you do the drawing so you could scale it yourself anyway.