Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to tween a mesh texture?

edited July 2013 in General Posts: 5

So im using the mesh feature for sprite sheets.. And you know

m=mesh()

So do i tween mesh texture? I already set it up for a recti, It gives me a return about y in
tween(4,m,{x=touchx,y=touch.y})
In my touched function

Comments

  • Posts: 5

    And please edit:GRAMMER, wow i looked nine years old.

  • Posts: 1,976
    1. Nine year olds can have good grammar.
    2. Next to your name is when you posted your comment, next to that is an edit button.
    3. I suppose you could tween it by creating a table for your mesh, with x and y coordinates in it, and animating that table using Tweens. You would also have to have saved the texture vertices for every vertex in your mesh. Then you can just change those vertices, and set the mesh's texCoords to them. For a 2D rectangular mesh, you can use a built in function (m:setRectTex(x, y, w, h), I think).
Sign In or Register to comment.