Hello i'm new to irrlicht so please don't jump on me if I say something wrong .
Using tutorial 3 i created the 2 nodes representing the 2 sides sides of a game card. On one I put a texture(the front of the card) and on the other the back of the card.
Now i need to create a node in which to add the other 2 nodes as child, and of course the distance between the 2 to be minimum so I can see them.
I have no ideea how to add child ( besides the simple function parent->addChild(child)).
Thanks in advance
2 sides of a card
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
And why exactly do you have to do it this way?Varn1807 wrote:the bad part is that i have to do it like this... don't get me wrong i'm not trying to make my homework or something like this. )
Unfortunetly this is how i have to do it, i made the 2 nodes now i have to make a third node in witch to put the other 2 as children and i have no ideea how to do that
If you really have to, you could create an empty scene node and add both sides as children with the addChild() method, be sure to align their positions and rotations correctly
If you are using planes to represent the sides of the card you'll probably get z-fighting issues when you put them back to back though, so that's another reason for not using this approach
-
- Posts: 363
- Joined: Thu Dec 16, 2010 8:50 pm
- Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..
Radikalizm wrote:And why exactly do you have to do it this way?Varn1807 wrote:the bad part is that i have to do it like this... don't get me wrong i'm not trying to make my homework or something like this. )
Unfortunetly this is how i have to do it, i made the 2 nodes now i have to make a third node in witch to put the other 2 as children and i have no ideea how to do that
If you really have to, you could create an empty scene node and add both sides as children with the addChild() method, be sure to align their positions and rotations correctly
If you are using planes to represent the sides of the card you'll probably get z-fighting issues when you put them back to back though, so that's another reason for not using this approach
wouldn't z fighting only happen if their vertex normals arefacing the same direction? if from my understanding of authors post, those two planes would be invisible (their normals are opposite directions)
ent1ty wrote: success is a matter of concentration and desire
at a cost measure in computer resourcesButler Lampson wrote: all problems in Computer Science can be solved by another level of indirection
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
-
- Posts: 222
- Joined: Mon Jan 19, 2009 10:03 pm
- Location: Miami, Florida
- Contact: