[BEHAVIOR] Ease transition

0 favourites
  • It's kind of designed as a transition behavior, thus always working between two endpoints. To make a waypoint system you'd need to check which end point you are at and change the target of the next hop appropriately. If you are currently at dest next waypoint would be set into origin, if you are at origin next waypoint is set into dest. It's a slight bit of magic but not too hard to do with a pair of events responding to each of the arrival conditions. Have the actions on IsAtOrigin change destination and the actions on IsAtDestination change origin.

  • I do have a lot of fun with this PlugIn already, but I am currently thinking if it is possible to add a z-dimension? Maybe as a scaling method? It would be great, if it would be possible set a size endpoint.

    Example:

    You have an image that is 32x32 in size on x=0 and y=0. Now you like to move it to x=10 and y=50 and increease the size of the image to 64x64.

    This would make it great to develop intro animations quite easy :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can already do that actually.

    ->Set Sprite Size : lerp(32, 64, Sprite.GauVeldt_Ease.GetTransition)

    I do love me some lerp. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • nice, this will help me out... thank you :)

  • I do have a lot of fun with this PlugIn already, but I am currently thinking if it is possible to add a z-dimension? Maybe as a scaling method? It would be great, if it would be possible set a size endpoint.

    Example:

    You have an image that is 32x32 in size on x=0 and y=0. Now you like to move it to x=10 and y=50 and increease the size of the image to 64x64.

    This would make it great to develop intro animations quite easy :)

    This can already be achieved using the On Update Tick trigger condition with an action to change the object's size (see Object:Set size) using the GetTransition expression (0==origin, 1==destination).

    Edit: An actual Z axis is a foreign concept to Construct 2 as it is currently only a 2D engine.

  • Thanks for your answer. am using the lerp functionality on the onTransition event...works great :)

  • I was going to make an extension that worked exactly like this, but implemented these modes as well.

    Want to do it instead of me(since you're the author of this extension and all)?

    (please don't use jquery/jqueryui, be as dependency free as you can)

    Also, in my opinion, it shouldn't even take a start and end point, 0 should be start and 1 should be end, and then you'd multiply and add to get what you want (similar to how RAND generates a number between 0 and 1, and you multiply it by the number you want to get a range)

  • I was going to make an extension that worked exactly like this, but implemented these modes as well.

    Want to do it instead of me(since you're the author of this extension and all)?

    (please don't use jquery/jqueryui, be as dependency free as you can)

    Also, in my opinion, it shouldn't even take a start and end point, 0 should be start and 1 should be end, and then you'd multiply and add to get what you want (similar to how RAND generates a number between 0 and 1, and you multiply it by the number you want to get a range)

    I had planned on adding support for custom transition functions at some point in the future. It is on the TODO list.

  • "custom" transitions means we'll be able to write our own transition functions? That seems like a lot of work! The examples I showed you would be enough [for me, at least], also their formulas are publicly available.

    Personally, I'd prefer if you wrote this as a purely mathematical plugin that didn't attempt to move stuff. It could be only expressions and return values in the [0,1] range, though I concede that it wouldn't be as friendly for newbies.

  • "custom" transitions means we'll be able to write our own transition functions? That seems like a lot of work! The examples I showed you would be enough [for me, at least], also their formulas are publicly available.

    Personally, I'd prefer if you wrote this as a purely mathematical plugin that didn't attempt to move stuff. It could be only expressions and return values in the [0,1] range, though I concede that it wouldn't be as friendly for newbies.

    The toggle to ignore movement is also a TODO item.

    There is already the function plugin if you want to write pure math functions in JS.

    PS: If you were to look in the code you'll see the transition functions aren't that scary. They just compute cosines using a bit of wizardry to translate the lerp fraction to an angle in radians.

  • Hi,

    I am new to Construct2 so I had some difficulty trying to add an ease-in transition on mouse click event. It worked fine with "ease-both ways". Please help me on this..

    Thanks.

  • Hi,very nice plugin making my life easier <img src="smileys/smiley32.gif" border="0" align="middle" />

    Have you considered add the possibility of adjusting the effect of easing?

    That is maybe the only thing, one could wish for, to make it work for all situations and have a more individual character of the transitions. <img src="smileys/smiley2.gif" border="0" align="middle" />

    Sorry, I just saw: I had planned on adding support for custom transition functions at some point in the future. It is on the TODO list.

    I guess, thats about, what I meant... awesome!

    Keep up the good work!

  • Hello Sir, how to disable/enable this behavior? Thank you :D

  • Thank you so much. Nice work

  • GauVeldt Nice I like it. It is very well done too. Thank you so much for sharing

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)