playMaker

Author Topic: Scaling a 2D Toolkit Sliced Sprite?  (Read 2928 times)

JennaReanne

  • Junior Playmaker
  • **
  • Posts: 57
    • Little Worlds Interactive
Scaling a 2D Toolkit Sliced Sprite?
« on: November 21, 2013, 06:02:46 PM »
Hi all,
I'm looking for suggestions on the best way to scale a sliced sprite created in 2d Toolkit.  Right now I have it working using 2 actions:

Float Interpolate: this scales the variable I'm using for the sprite's width
Set Property: Grabs the float and sets it as the sprite's X Dimension every frame

This works but the result is very jerky looking.  Any other suggestions on how to do this?  It would be great to be able to interpolate properties :)

Thanks,
Jenna

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Scaling a 2D Toolkit Sliced Sprite?
« Reply #1 on: November 28, 2013, 05:37:20 AM »
Hi,

Use iTween or another tweening engine for this.

OR, interpolate taking in account the delta time ( that you can get using the "gettimeinfo" action).

 you are having jerky results likely because of framerates fluctuation, the key is to animate NOT frame dependant but time depending, so with itween, you specific a time and/or if you want to manbually do it, include the deltatime into your math to remove any frame rate dependancy.

bye,

 Jean