Invisible wall , level borders

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
nzervu
Posts: 17
Joined: Tue Oct 21, 2008 7:44 pm

Invisible wall , level borders

Post by nzervu »

To create my level/map bordes I would like to create invisible walls, so that models collide with it and will not be able to walk further.

Any suggestions? Thank you in advance

And something else.. I want to create a rails texture in 3dsmax. Is there a way to make it semi-transparent?
like below, where white is transparent...

| | | | | | | | |
Anteater
Posts: 266
Joined: Thu Jun 01, 2006 4:02 pm
Location: Earth
Contact:

Post by Anteater »

For your first question, model your invisible wall, and then make a 100% black texture for it, then set that as the texture for your invisible wall mesh, then set the material type to EMT_TRANSPARENT_ADD_COLOR.
nzervu
Posts: 17
Joined: Tue Oct 21, 2008 7:44 pm

Post by nzervu »

thanks!
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

Anteater wrote:For your first question, model your invisible wall, and then make a 100% black texture for it, then set that as the texture for your invisible wall mesh, then set the material type to EMT_TRANSPARENT_ADD_COLOR.
does setVisible(false) work in this case?
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

for that, you have to make difference in your loader algorithm.
i suggest you to make it transparent texture, and just give a full transparent texture xD

or if youre making the whole map in one model, then that would be a good idea to use a different model for collision.
you know, one model for displaying, and one more, more primitive model what not shown, but used for collision
Image
Image
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

You could also make an animator that limits the position of the camera to be inside of the bounding box of the terrain. Doing anything that renders transparent, or semi-transparent geometry would be a bad idea.

Travis
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

You could also just add the box to a collision mesh, and set that as the mesh for the collision animator. This way you wouldn't have to draw anything
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

what you are saying is just good for squared maps.
but what about if you make an island, and dont want to let your player to jump into the water?
dunno what does he want to achieve thou
Image
Image
nzervu
Posts: 17
Joined: Tue Oct 21, 2008 7:44 pm

Post by nzervu »

B@z wrote:if youre making the whole map in one model, then that would be a good idea to use a different model for collision.
you know, one model for displaying, and one more, more primitive model what not shown, but used for collision
That's what I did and works fine! Thank u all
Post Reply