Gravity script V1

Heres a lil script i worked up. it’s suposed to do worlds, liek mario galaxies. works quite well i think :D. the way it works is the object tracks to the parent of the gravitational field (an ico-spehre) and then i whipped up a lil gravity thing. sometimes it won’t land though, so to fix that, hold down space when in the gravitational field (launches your ‘player’ along the local y axis, which track-to’s the world). shift moves you along the global y axis. it’s simple enough, and you’ll get the best understanding if viewed from top view, showing physics. hope you like it :smiley:

PS – i might change this around later.

Attachments

Gravity Test.blend (285 KB)

Hey, that’s some nice bit of code you’ve got there!! Well Done!! It works very well and is accurate. Thanks!

~Túrin

thanks, but i just realised this only works for one object. it shouldn’t take much longer now, i’m trying to make it function with multiple objects. should be up some time tommorow, i hope?

Not able to try out atm, but it sounds interesting.

This should help the community to stop developing crappy MMORPGs or FPS (don’t kid me wrong though there’s some good ones) and start developing a new kind of game.

I always liked space concept as a game.

well, i had another go again, and managed to get the script to work by using mass. it works by converting mass to BU, and if the object is within range of this conversion, it’s sucked up. works great, but it will always be gravitating towards something from the first time it becomes attracted. Also, the code is weak, and quite unflexible. I won’t post it, but if you wanna see it, i will. (i mean ask for it :D)

I plan on going back to the original plan, i know how to fix it :smiley:

Thanks for commenting :smiley: make me feel good :smiley: