Cana anyone explain me the Metaselector

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
m3rk
Posts: 7
Joined: Tue Dec 09, 2008 1:50 am

Cana anyone explain me the Metaselector

Post by m3rk »

How can I set the z axis? Does vector3df goes like this vector3df(x,z,y);?
Because when I try to set the middle to 1000, I started from the top so that's why I think the middle is z. Can anyone explain it?

camera->setPosition(core::vector3df(-100,0,-150));

By the way, check out the image below. They are all floating. How can I fix this? I try to make it 0 but it didn't work.

Image
Last edited by m3rk on Thu Dec 11, 2008 2:14 pm, edited 4 times in total.
nathanf534
Posts: 199
Joined: Tue Dec 09, 2008 2:55 am

Post by nathanf534 »

a vector is (x,y,z) in irrlicht.
the snowmen arn't touching the ground, probably because the floor isn't level with the axis. Try setting the position of the snowmen to something like (0,-10,0) or you could enable collision detection, and turn on gravity.
Last edited by nathanf534 on Tue Dec 09, 2008 3:40 am, edited 2 times in total.
while(signatureEmpty){cout<<wittyComment();}
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

I don't know about the whole vector3df(x,z,y) because I define it as vector3df(x,y,z), so in my opinion, the best thing would be to define it as: vector3df(horizontal,vertical,depth).
TheQuestion = 2B || !2B
m3rk
Posts: 7
Joined: Tue Dec 09, 2008 1:50 am

Post by m3rk »

Now I'm confused. Where to define it?

And do I need to put scene::ITriangleSelector* selector = 0; for each object I want to put gravity? Is there any simplest way to do this? Because I found this thread: http://irrlicht.sourceforge.net/phpBB2/ ... +collision

He use selector for camera and selector2,selector3,selector4 for the object. What will happen if I put hundreds of object?. So it means, selector100? LOL.
nathanf534
Posts: 199
Joined: Tue Dec 09, 2008 2:55 am

Post by nathanf534 »

you can put all of your selectors into one by using MetaSelector.
while(signatureEmpty){cout<<wittyComment();}
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

Irrlicht uses the Y axis for height, so that may be what is confusing you.

+X is to the left.
+Y is upwards.
+Z is out of the screen.
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Dark_Kilauea wrote:Irrlicht uses the Y axis for height, so that may be what is confusing you.

+X is to the left.
+Y is upwards.
+Z is out of the screen.
Now that is confusing :lol:
Irrlicht uses a left-handed y-up coordinate system, which means
+x to the right, +y upwards, +z into the screen :!:
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Indeed. Hold your left hand out in front on you, with your thumb pointing up at the ceiling, your index finger pointing at the screen, and your middle finger pointing to the right.

Middle finger = +X
Thumb = +Y
Index finger = +Z

It's that easy to remember. Write the letters on your fingers if it helps. :P
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

Ah yes. Poor me has been using right handed coordinate systems too much lately. So easy to get confused.
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Not really. Do the left hand point, and all is well with the world. Do the right hand point at your own face and you break your wrist and/or lose an eye. And that's the best case scenario.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
m3rk
Posts: 7
Joined: Tue Dec 09, 2008 1:50 am

Post by m3rk »

Ok now I got it. Now I have a problem with metaSelector. Can anyone give me some code that uses metaselector and I'll try to understand it.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Example 15 from 1.5 beta.
Post Reply