Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / CreatePhysicsforce, range parameter.

Author
Message
Efraim
3
Years of Service
User Offline
Joined: 3rd May 2020
Location:
Posted: 3rd May 2020 21:33
Hello!
I would like to know how the range parameter of CreatePhysicsForce works. The value we give represents pixels or units? In order for a sprite to be affected should at least one pixel be in range or it works differnet? ( for example if only when the offset point is within the range )

Thank you in advance!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th May 2020 01:06 Edited at: 4th May 2020 01:27
Have a look at this

When they talk about screen size they are talking about VirtualWidth/Height.

I have noticed hat by setting the Virtual Width/height smaller, the forces are greater
Efraim
3
Years of Service
User Offline
Joined: 3rd May 2020
Location:
Posted: 4th May 2020 10:48
Hello, thanks for the reply!

So i read the description of the command SetPhysicsScale and it seems to be one important key in order to understand what is going on. I also looked into the notice you made. My first thoughts were that when the virtual resolution is scaled down and the physics scale remains the same, then the new screen in the physics system is less in meters x meters (width x height ) and with the same force an object will travel from the one side of the screen to the other faster not because the force is greater but because the object has to travel less meτers.

Yet i have some questions about the function createphysicsforce i cant answer. Need to study more
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th May 2020 11:18

Login to post a reply

Server time is: 2024-04-26 04:08:51
Your offset time is: 2024-04-26 04:08:51