vex modulo / warp

   15003   2   0
User Avatar
Member
20 posts
Joined: Nov. 2016
Offline
Hello

i am trying to loop animated sprites and crying whole day cose don't know what is wrong

nothing from written doesn't work:

textureindex = wrap(@id, 0, 18);

textureindex = mod(@id, 18);

is there any way how person as me can to find out how should i write it?


many thanks
User Avatar
Member
9384 posts
Joined: July 2007
Offline
% is a modulo operator, so it would be

int textureindex = @id % 18;
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
20 posts
Joined: Nov. 2016
Offline
Many thanks Tomas

I found % Modulus in VEX language reference
but wasn't sure how to use it.

thanks

btw i need some mind maps to understand where should i write which code
  • Quick Links