VMTs and proxies - offsetting texture

Grab your favourite IDE and tinker with the innards of game engines

VMTs and proxies - offsetting texture

Postby project6 on Sat Mar 08, 2008 3:17 pm

Hi

I need to offset a texture depending on a variable, not animate it to scroll, just offset it

Like this

Before:
Image

After:
Image

(the image has been offset/"pushed" to the left <------------- and wrapped around)

I thought this was done with $BaseTextureOffset, but I can't get it to work.
$BaseTextureOffset is a vector (2D or 3D, I don't know) so basicly it would just be a matter of accessing the first element (X-position) like this:

Code: Select all
"resultVar"    "$basetextureoffset[0]"


where resultVar is the value (in pixels, I guess) to offset.

Doesn't work though. Any suggestions?
project6
Dumpling
Dumpling
 
Joined: Tue Mar 04, 2008 12:56 am

Return to Programming

Who is online

Users browsing this forum: No registered users