Actor Stretch!

SadiQ

  • Posts: 1778
    It's time to continue with my "cool" and useless behaviors trend...so now here it is:
Actor Stretch :http://www.stencyl.com/game/play/20757
    The behavior is on the forge with the same name.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

dude99999

  • Posts: 121
It's kinda fun.  :)
Visit Power Spark to play more of my games.

Wifido

  • Posts: 133
Hi SadiQ,

Looks good.  I am trying to port it to 3.0 to play with there.
It is complaining about the Box2DAS.Common.b2Vec2 import.
Not sure why yet...it's in the API...

http://api.stencyl.com/as3/


rob1221

  • *
  • Posts: 9424
That is the 2.2 API.  If you want the 3.0 API look here: https://dl.dropboxusercontent.com/u/4236876/docs/index.html

Wifido

  • Posts: 133
Thanks!

I got to the older API through the Stencyl 3.0 Help->View API menu.

It appears the B2Vec2 class was moved

From:
Box2DAS.Common.b2Vec2

To:
box2D.common.math.B2Vec2


HOWEVER, I have not verified that they are the same API yet...

« Last Edit: August 23, 2013, 11:55:15 pm by Wifido »

SadiQ

  • Posts: 1778
@Wifido: Let me know if you manage to do it and maybe post an example to see it in action?

@rob1221: Thanks for the 3.0 api...I'll have to take a look at it to see how much things will change by the time 3.0 comes out of beta :)
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

gamegirlxl

  • Posts: 716
I'm really interested with the stretching, but Stencylforge seems to be down still  :(.  If possible could you explain how you stretch it like that?  I am making a 3D Stencyl engine and I want to see how I can have "textures" (like Minecraft) instead of having my scene draw polygons.  Even if it's not a perfect match (like scaling the image by its corners), I think that any feedback you could give me would help enormously.

SadiQ

  • Posts: 1778
It's all just a transformation matrix applied to the actor...nothing fancy.
I borrowed most of the code from a tutorial I found here: http://www.andysaia.com/radicalpropositions/procedural-squash-and-stretch-in-as3/
You can read more about the transformation matrix here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/Matrix.html
And just in case the forge goes down again I'll leave the behavior attached here.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.