- Home /
How to make first-person work in zero-G with planets?
As my first project with Unity, I'm trying to make a 3D star system that you can fly around in first-person. I'm not too worried about planetary gravity, but my real problem is that you can only get so close to the planet before you just stop. I'd like to be able to just fly up to a planet and skim the surface (before you ask, no, I don't need anything on the surface other than textures) without being locked on one altitude or being kept a certain distance from each planet.
I guess what I'm trying to ask is, how do I make the camera go straight forward, with little to no regard for collisions or physics in general?
I think I misunderstood something. If you don't want collisions or physics, can't you simply remove collider and rigidbody components of the camera game object and just attach a 3D movement script? Please tell me if this wasn't a misunderstanding and is actually the answer you seek so I can convert it to an answer ins$$anonymous$$d of a comment.
I still don't want to be able to fly through the planets, though. I'm using the default first-person control object, but I removed the physical object linked with it. Not being locked onto a horizontal plane is a requirement.
If you don't want to be able to fly through the planets, you must use colliders. Also, I do not remember the fps controller script so I can't say for sure if it will work in 3D movement or not. But it shouldn't be hard to write such a movement script.
Answer by cwperkins83 · Dec 07, 2012 at 10:06 PM
I'm building a space game similar to what you're talking about. I just have the camera with a small box collider on it and then rigid bodies with gravity disabled and sphere colliders on the planets.