Tunle Truble

Blitz3D Forums/Blitz3D Beginners Area/Tunle Truble

Josaih6/10(Posted 2009) [#1]
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.


Ross C(Posted 2009) [#2]
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 :)


Warner(Posted 2009) [#3]
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.



Josaih6/10(Posted 2009) [#4]
How do I make only part of the terrain transparent?


AJ00200(Posted 2009) [#5]
EntityAlpha entity,Precentage
Use hideEntity(entity) to hide it


Warner(Posted 2009) [#6]
<double post removed>


Warner(Posted 2009) [#7]
<edit>Scratch this idea. It screws up Z-ordering. I'm not sure how you could do that.</edit>


Josaih6/10(Posted 2009) [#8]
Won't those hide the whole thing?


Josaih6/10(Posted 2009) [#9]
sorry those won't make sence. slow internet.


Warner(Posted 2009) [#10]
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:



Josaih6/10(Posted 2009) [#11]
Thank you all. One of these will work. However I'm always open to further suggestions.


AJ00200(Posted 2009) [#12]
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.