hi there i was playing with unity's physics and i was trying to set up gravity on a sphere, to make some kind of planetary gravity in which things would "fall" to the sphere, and if they are going to fast orbit it.. this is what i have so far: http://www.coatlstudios.com/planetarygravity/planetarygravity.html go there if you have some spare minutes to spend looking at it 8)
I like how the cubes and balls are affected by moving the camera... as if you were really spinning the objects. Nice effect over all. You should play with the concept of escape velocity.
the cubes and balls are not affected by moving the camera, the camera just orbits the big ball... the cubes and balls are actually spinning around the big ball as matter of gravitational consequence of the big ball fast spinning, note how the cubes and balls end making a ring around the big ball equator due to the rotational forces 8)
Are you sure the cubes are not affected by moving the camera? I violently twisted the earth around and noticed the cubes, and balls changed their trajectory, some moving away from the "planet", others bunching up in odd ways, all in sync with the movements I had been throwing at them. Perhaps I am imagining it, but it looks like that to me.
Neat. I have to get off my butt and touch-up/post my gravity simulator (simulates our solar system in Unity). It's of the same ilk but on a slightly larger scale with many many bodies. Kudos!
Ok, by end of week it'll be on my work blog. I promise. If I fail you can, well, I dunno, talk trash about me? But back on topic, what's the impetus for your work dodongoxp? Is this just experimentation or are you working on some cool game that needs this sort of thing?
nice effect! Is this based on the script found in the Unify Community: http://www.unifycommunity.com/wiki/index.php?title=Gravity ? I never was able to set that up properly... Cheers, Sandor
im experimenting because i want to try an idea of a game which deals with this kinda of stuff, planetary and cosmic stuff and manipulate gravity and forces and make a mess with planets and stuff hehehehe Nope.. i wrote my own gravity scripts 8)
podperson made some "faux gravity" scripts a while back. I only tried it with a wheeled vehicle and it went into orbit when I drove too fast . Can't seem to find the thread though. :?
Today, today, I must do it today... (simple GUI added, just completing the full solar system instead of only the inner four)
Yeah, podperson did some of those. I think I still have the ones he worked over for me. Once I get home I'll post them.
Appears that the link is down? When I first clicked it, it crash IExplorer (all open instances of it too!) - Now I just get a 404?? Yes, planetary gravity will be a major part in my game - I haven't figga'd out how I'm going to implement it yet - I would have liked to have seen this... -Will
We did have a brief outage (like 10 minutes long) earlier today, that may have been during that window.
hi there, im sorry. i removed the example, i thought the thread was old enough and wasnt going to get more replies and removed it sorry
Yeah. Just a word of advice, don't ever remove anything from the Unity forum that someone might find really useful. Its really annoying to come across an older thread, and find that all the images are gone, and the link doesn't work.
Hey all, I've finally posted a demo of my project in its current state. It's not 100% done and so I'm not yet sharing the source but I thought I'd let folks take a peek anyway: OrbitSim In order to make this work I had to tinker with the scale of things, so 1 world unit is actually an AU (the average distance of the Earth from the Sun, or 1.49598 x 10^11 meters), one unit of mass is an Earth mass (5.9742 x 10^24 kg) and each second the simulation runs is actually a full Earth day (8.64 x 10^5 s). But everything in my simulation is accurate to scale except the size of each body as each of those are magnified immensely so they'll show up and be more than pixel (or sub-pixel) dots moving around. The only thing driving motion in this simulation is the calculated and applied (via PhysX) forces of mutual gravitational attraction. To explain the numbers along the bottom: TE: this is the total energy of the system, it's calculated each step of the simulation and is the sum of the potential energy between each pair of bodies and the kinetic energy of each body individually. For a system to be "closed" (the bodies stay in a system like our solar system does) the total energy must be less than zero. A total energy of zero or above is an "open" system and the bodies won't be bound in orbit in any way, they'll just fly off to infinity (this is how you calculate a rocket's escape velocity, how much kinetic energy is needed to make the rocket/Earth system's total energy greater than zero). You'll see a number in parenthesis next to the total energy, this is the percent change since the simulation started (so I trap the total energy at the start, then calculate it again each step and compare those). A perfect simulation would have _zero_ change as energy should be conserved. My demo is reasonably good but far from perfect. Time: this is the total time elapsed since the simulation began and it's listed in Earth years. Keep in mind that each second of the simulation is one Earth day, and I have Time.timeScale bumped to 50.0 to keep things moving quickly (solar system time scales are HUGE). FPS: duh.
'Sup, Higgy, I can see no content at all in any of the 4 frames, is it what it's supposed to be ? Do I have to wait or something to generate ?
Nope, should load quickly (the app loads and pulls an external XML file with the orbital system data, but it's like a few kb of text, that's it. What do you see along the bottom? Are there numbers for the total energy (TE) or NAN or ???
Hmph, that's a sign that there are zero bodies in the system then as there should be a non-zero total energy for sure. Please PM me your config info (OS, browser, player version) if you don't mind. Thanks!