Tunle Truble
Blitz3D Forums/Blitz3D Beginners Area/Tunle Truble
| ||
I would like to create a tunnel that travels under a terrain and is accessible from above it. How do you delete a selected area of terrain so you can get under? Code would be greatly appreciated. |
| ||
That's a really tough question, as it depends on your terrain build. You terrain might have thousands of polygons, or might have hundreds. You really need to create this tunnel in a modeller to get the best results. However, If you make the tunnel twist a few times, like a U bend, or a twist, you can test to see how far the play is inside the tunnel, and hide the terrain. This will only work though, if the tunnel is designed in such a way that: When your can see the entrance to the tunnel, the terrain should be visible. When you can see the part it dips underground, the terrain should become invisible, allowing the player to go down the tunnel. You would want to create two pivots inside the tunnel. When you come close to one, it should hide the terrain. When you get close to the other one, it should show the terrain. Obviously, adjust this to make it look proper :) |
| ||
If you are using Blitz Terrains, it is not possible to cut a hole in it. However, you could perhaps make a part of the terrain transparent. Another option is, create a hill mesh in a modeller, with a tunnel inside it. Use a common Blitz terrain, and place the hill somewhere on the terrain and move it downwards so it sticks a bit through the ground. That way it looks as if the hill is part of the terrain and it has a tunnel in it. |
| ||
How do I make only part of the terrain transparent? |
| ||
EntityAlpha entity,Precentage Use hideEntity(entity) to hide it |
| ||
<double post removed> |
| ||
<edit>Scratch this idea. It screws up Z-ordering. I'm not sure how you could do that.</edit> |
| ||
Won't those hide the whole thing? |
| ||
sorry those won't make sence. slow internet. |
| ||
Maybe instead of trying to create a transparent terrain, you could create 4 smaller terrains and place them next to each other in such a way that a hole appears: |
| ||
Thank you all. One of these will work. However I'm always open to further suggestions. |
| ||
make a tunnel mesh with a black opening. When you hit it, it loads whas in the tunnel. Or, put valut like doors in the entrances. When the user opens them, a cut scene plays of the user walking into the tunnel while you hide the ground. |