Prevent player from flying through skydome?

So I’m insanely new to 3D modeling, Blender, and obviously BGE. I’ve watched about 25 videos (following along with them), and have created several different blends to get experience. I’ve decided that it “should” be easy enough to make a space game with a 3rd person view over a ship. To start off it’ll just be 3D asteroids with the hope of making it multiplayer arena style where players can dogfight in space. HIGH HOPES and LOADS of patience on my part, haha.

So, starting off – the skydome. I’ve got my space backdrop and with a static ship floating at 0,0,0 it looks great, but 2 issues:

  1. If the player starts to move it’s OBVIOUS they’re getting closer to the dome. I tried using a crazy high rez texture and making the sphere massive, but it disappeared when it got too far away. I know it’s an LoD issue but I’m not to the point of fixing that yet, nor do I think this is even the correct solution
  2. When viewed from the side it’s again obvious it’s just a texture close by. There’s no depth. Objects closer would seem to move faster than those farther. This effect is not achieved with a single texture.

So, all that leads me to my question of: How is this done? Every space game made has a stars backdrop that really looks like it’s far away, and you can fly forever and never reach it. A good example is Star Trek Online, or Mass Effect.
(Oh wow, I just typed so much for such a simple question)

How do I do it, and thanks in advance for any help. :slight_smile:

Unless you want more complex effects like parallax, simply vertex parenting (so it doesn’t rotate) the skybox to the player should be sufficient.

Perfect, thanks. I’ll save the complex stuff for down the road when I know more what I’m doing. :slight_smile:

This is less a LOD problem (because there is simply no LOD). It is a problem of camera frustum culling. The faces are to far away from the camera to be seen. This is natural as the sky object should be behind all other objects.

The simplest method is to vertex parent the sky object to the camera. As cameras do not have vertices, you need an intermediate object with at least one vertex.

  • Parent this object to the origin of the camera
  • Then select the sky object
  • Shift select the intermediate object
  • Go into edit mode
  • Select the single vertex
  • Apply vertex parent by <ctrl + p>
  • Leave edit mode

My camera is parented to the player, so I’m assuming the best course of action is to just parent the sky to the player instead of the camera? Or will it make a visual difference otherwise?

Once I experimented by making overlay background scene with the skydome and a camera with mouselook only, which repeats the player looking around, but not moving. It worked and looked good and most inportantly, you can’t fly through it.

If the distance between the camera and the player is very small compared to the distance between the player and the skybox (say about a 1:100 ratio), then any visual differences should be negligible. The larger the ratio, the more noticeable the shift between the camera and the skybox will be. You could always just scale the skybox up if it’s an issue.