|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Author |
Message |
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Gravity Variables In lua
Can you change the gravity of an area of course, by using lua? As in, are there variables you can change in lua that can change how much gravity an object has.
|
Tue Jul 07, 2009 9:54 pm |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
Re: Gravity Variables In lua
Not that I remember. I think GlobalAccScalar is read-only right now.
|
Tue Jul 07, 2009 9:55 pm |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Gravity Variables In lua
Okay. So you can't, in effect, get rid of gravity yet without it being a scene?
|
Tue Jul 07, 2009 9:58 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: Gravity Variables In lua
To calculate the velocity to change gravity, use this code: target.Vel.Y = target.Vel.Y + (gravity * TimerMan.DeltaTimeSecs)
gravity can be negative, like -20.
|
Tue Jul 07, 2009 10:02 pm |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Gravity Variables In lua
Oh ok, thanks What is the default variable for gravity?
|
Tue Jul 07, 2009 10:05 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: Gravity Variables In lua
20. Older scenes had 19 ish.
|
Tue Jul 07, 2009 10:09 pm |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Gravity Variables In lua
To get the scene's gravity, use SceneMan.GlobalAcc.
|
Tue Jul 07, 2009 10:09 pm |
|
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|