Hello Guest

Author Topic: Correctly accessing sprite's mesh vertices?  (Read 3496 times)

bcullis

  • Newbie
  • *
  • Posts: 3
    • View Profile
Correctly accessing sprite's mesh vertices?
« on: October 07, 2013, 04:23:10 pm »
My goal is to apply a shear operation to a sprite, basically taking the top two verts and moving them over and down a little (i.e. from square to parallelogram).  I've almost achieved the same effect with simple localScale modifications (minus the sideways move), but for more flexibility and other ideas being tossed around, what's the correct (if any) way to access the positional data of the sprite's mesh vertices?  Do I directly modify sprite.positions?  I tried that and got some incredibly weird artifacts instead of expected behavior, so I'm not sure if that's the right path to be going down.

Thanks!  TK2D has been awesome to work with!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Correctly accessing sprite's mesh vertices?
« Reply #1 on: October 07, 2013, 11:41:54 pm »
I suggest looking at the clipped sprite code. That takes the sprite and manipulates the verts - you could probably base your sheer behaviour in a similar way.