Unit Selection

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
AndreOdendaal
Posts: 16
Joined: Tue Dec 27, 2005 10:13 am
Location: Johannesburg, South Africa

Unit Selection

Post by AndreOdendaal »

Hi Guys,

Like in an RTS I'd like to render a circle around the base of a mesh when the user selects it. I've tried a billboard but they don't do the job. Would a decal work? And if so can someone point me in the direction of an example?
Guest

Post by Guest »

yes a decal could work.

point in the direction: place the decal or a simple mesh with a circle texture below the unit .... its very easy.

if you dont know how to do that, you should ask yourself if an rts-type game isnt a number too big for you ;)

good luck & see you!

bye
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

what is a decal?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Guest

Post by Guest »

Detail, game decorations...

Images layered over an already textured object. Like foorprints, the chip/burn marks left on a wall when shot with a bullet, or a selectable arm patch.
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

Ok thx.
sry to spam this thread but is irrlicht able to do that and if how?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

Yes, Irrlicht is able to do decals.

Thanks to Armen138 DecalSceneNodeClass everything is easy.
You have the link below to the full class:

http://irrlicht.sourceforge.net/phpBB2/ ... ecal#21113

Here you have some tutorials/advices:

http://www.irrlichtnx.mmdevel.de/phpBB2 ... ?p=556#556

I use Armen's class and Irrlicht 0.12 and it works excellent.
Here is a shot from my game:

Image

Btw. My User interface and crosshair is purple isn't it ? I hope it is not pink, I think I have some problems with differing colors. :P
Maize
Posts: 163
Joined: Sat Oct 29, 2005 12:12 am
Location: In a cave...
Contact:

Post by Maize »

Dawasw, thats cool but I hope that means you will still work on lotr. Also the gui looks a little pink but it could but bright purple. Go a little darker and you should be fine. That is of course, if you insist on having it purple because it looks great as it is. 8)
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

That is great with the decals!!!
But is there a way to get it worjing with only having a point and the normalvector? cause i'want to display the decal in free space and there are no triangels where i could attach it to.....i would need to get three points all on a plane.....i know how i could culculate that but the programm can't...lol
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

in this decal eksample a project specific headerfile, "time.h" is used- Does anyone have this file? (tutorial links are dead)
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

Time.h should be included with your dev-cpp compiler. (I think it should be included in every c++ compiler ;) )
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

oh.. it is -that- header..?
i thought it was task specific because of its reference -eg

Code: Select all

"time.h" and not <time.h>..
ok, thanks -i'l try the default time.h and see if i can make it spin
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Post Reply