Last active
December 16, 2015 08:48
-
-
Save Jimbly/5408241 to your computer and use it in GitHub Desktop.
Cloud Party: floating beach ball script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function tick() { | |
| //error('test'); | |
| var z = getParam('ground_height'); | |
| var pos = getPos(); | |
| if (pos[2] < z) { | |
| setGravity({ gravity: [0, 0, min(5, z - pos[2])] }); | |
| } else { | |
| setGravity({ gravity: [0, 0, -9.8] }); | |
| } | |
| } | |
| timerCreate({ | |
| name:'tick', | |
| period: 0.01 | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment