Archived

This topic is now archived and is closed to further replies.

Peter Cunliffe

Swapping Textures on 2D Entities

Recommended Posts

I want to put a 2D plane on my Terrain and then sequence 8 textures on it for simple animation. Is this possible or best done in a modeller? Thanks in advance for helping! Petrovski

Share this post


Link to post
Share on other sites
I believe this will work, but I haven''t tried it:

Load all the textures and store the texture numbers (in an array probably).
Create the material for the 2D plane and save it''s number.

Then, replace the material''s texture in some timed way:

PR_Globals.PR_Materials[terrainMaterial].texture_number[0] = terrainTexture[texNumber];

Share this post


Link to post
Share on other sites