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.

AppGameKit Studio Chat / How to make 3d sphere drop to the ground?

Reviewed AGK on Steam
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 2nd Jul 2022 21:06

This code makes the sphere appear in the middle of the screen, but the sphere does not fall down:


Login to view attachments
Virtual Nomad
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Jul 2022 23:12 Edited at: 2nd Jul 2022 23:21
Set3DPhysicsGravity wrote: "Gravity is set to ( 0.0, -10.0, 0.0 ) by default."


where you've got a different sense of gravity:
...which is moving it RIGHT, UP, and AWAY (depending on camera orientation)
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 3rd Jul 2022 06:02

This example will set the Physics to where 1.0 = 1 Metre within the Physics Simulation; as such we can use 9.81 as our Graphics (Y is our Gravity Axis., -9.81 means we want objects to go Down at 9.81m/s).
If we use 1.0 (like you do) then remember the values are how many of those Units / Second are calculated; as such you're working in Centimetres.
Of course, keep in mind that this is "Accurate"., which often isn't ideal for actual gameplay.
Common practise is to reduce this to say 40-60% Scaling., as this slows down the simulation enough for more enjoyable gameplay.

TheGameCreators for example set this to 40% by Default., although *how* they come to this calculation is interesting; by calculating Inches / Metres for 6ft of Distance.
I'd argue this confuses things somewhat... and just look at it as 100 = 100% Speed., 40 = 40% Speed; and as noted for "Comfortable" Gameplay Physics you want it somewhere ~50% real speed.
You can actually change this at anytime; so say you wanted to introduce bullet time like gameplay (like Super Hot) you could say reduce it to 20% or even 10%.

Login to post a reply

Server time is: 2022-08-09 09:20:20
Your offset time is: 2022-08-09 09:20:20