Split a texture (roll out map)

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
Catprog
Posts: 164
Joined: Wed Jan 31, 2007 9:07 am
Contact:

Split a texture (roll out map)

Post by Catprog »

I would like to know how to split a texture so only some of it is displayed.

The idea is I start of showing most of textureA but most of it off screen and as I move it to the right (on screen) I also remove part of the right hand side(texture)

The reverse will happen for textureB I will show the left hand side and show more of it as the animation progress.

the idea is meant to be like laying out a map backwards and then rolling it the right side away.

Also how can I scale it to the size of the screen.
arrival
Posts: 8
Joined: Mon Feb 27, 2012 9:50 am
Location: Poland

Re: Split a texture (roll out map)

Post by arrival »

If you draw the rolling map in the screen space the easiest way would be drawing 2DImage, as the drawing function takes source and destination rectangles. You would just need to animate source rectangles deimensions. If map is modeled in 3d as a mesh it will be harder to do that...but with UV animation and mesh scaling its doable.
Post Reply