Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simulating changes in gravity
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#2
RE: Simulating changes in gravity

(04-02-2012, 09:07 PM)Damascus Wrote: I was messing around with repeated prop forces when I discovered a way to easily simulate reversing gravity on an object. Once the script is activated, objects will "fall" upward seamlessly, bouncing and rolling on the ceiling like they normally would on the floor. You can also still grab objects and throw them around, and I had a lot of fun lodging books on the undersides of tables.

AddTimer("AntiGravity", 0.0f, "AntiGravity");

void AntiGravity(string & asTimer)
{
AddPropForce("[ENTITY]", 0, X, 0, "world");
AddTimer(asTimer, 0.01f, "AntiGravity");
}

X = 20 * mass of object

If you're extremely delicate about force, I think you can possibly modify it to reduce gravity and even make objects hover. Have fun playing with this!

You can indeed simulate pretty much perfect zero-gravity, with a loop running very fast indeed (0.015 or thereabouts), and the perfect amount of +Y force. For a wine bottle, that is 19.7, and a small throwable box is 118. It is, however, much easier to make a new model and untick 'Has Gravity'. Depends if you want to activate / deactivate it in script

I spent a fair amount of time in a very big room with lots of zero-g boxes after getting that right Tongue
(This post was last modified: 04-02-2012, 10:12 PM by Adrianis.)
04-02-2012, 10:11 PM
Find


Messages In This Thread
Simulating changes in gravity - by Damascus - 04-02-2012, 09:07 PM
RE: Simulating changes in gravity - by Adrianis - 04-02-2012, 10:11 PM
RE: Simulating changes in gravity - by Damascus - 04-03-2012, 12:00 AM
RE: Simulating changes in gravity - by Adrianis - 04-03-2012, 03:26 PM
RE: Simulating changes in gravity - by Homicide13 - 04-05-2012, 10:28 AM
RE: Simulating changes in gravity - by Adrianis - 04-05-2012, 12:03 PM
RE: Simulating changes in gravity - by Kman - 04-05-2012, 10:56 AM
RE: Simulating changes in gravity - by Damascus - 04-06-2012, 01:01 AM
RE: Simulating changes in gravity - by Homicide13 - 04-05-2012, 09:35 PM
RE: Simulating changes in gravity - by Adrianis - 04-05-2012, 09:45 PM
RE: Simulating changes in gravity - by Adrianis - 05-21-2012, 12:21 AM
RE: Simulating changes in gravity - by Damascus - 04-06-2012, 04:34 AM
RE: Simulating changes in gravity - by Adrianis - 04-08-2012, 10:13 PM
RE: Simulating changes in gravity - by Damascus - 04-08-2012, 11:09 PM
RE: Simulating changes in gravity - by DRedshot - 04-15-2012, 03:00 PM
RE: Simulating changes in gravity - by Adrianis - 04-15-2012, 05:18 PM
RE: Simulating changes in gravity - by Damascus - 04-16-2012, 06:37 AM
RE: Simulating changes in gravity - by Damascus - 05-11-2012, 07:26 AM



Users browsing this thread: 1 Guest(s)