ourotorrus's Recent Forum Activity

  • Ah ! working very well

    Thank you so much

  • I have the same issues, I don't think this is a bug, it's a missing feature.

    When the search feature doesn't work, I usually click on some random events and then click search again and that does the job.

  • So let's say you have an item "box" which is a sprite.

    You have 3 "box" in your layout.

    Those "box" are overlapping each other, and I would like to make them interacting to each other this way :

    If a box is overlapping another box on the left, it goes 1 pixel on the right

    If a box is overlapping another box on the right, it goes 1 pixel on the left

    Currently, I have this :

    "box" is overlapping "box" at offset -1, 0 : Set X to Self.X+1

    "box" is overlapping "box" at offset 1, 0 : Set X to Self.X-1

    Which is working fine for 2 item, but not 3 or more.

    For each doesn't work either.

    Any advice ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I get the picture yes, this is good to simulate a framerate animation btw

    I like the idea of creating a step global variable to control the use of dt

    The subevent

    If step > 100 >>>>>>>>> set value to max

    Can be used to define the maximum value to prevent overshooting as well

    Thanks

  • Well even after reading this very interesting article scirra.com <img src="{SMILIES_PATH}/icon_arrow.gif" alt=":arrow:" title="Arrow" /> /blog/ashley/17/using-lerp-with-delta-time?action=lastpage&t=1461233976004#lastcomment

    I can't manage to have something accurate

    I guess the best is to carry on with timers and put maximum/minimum values to prevent any overshoot... technically you can't really have a 100% accurate value animation using lerp I think.

  • I am not sure it's quite working though,

    In another try I have some overshoot issue, I wonder if that's because I'm using a timer and not dt...

  • 99Instances2Go

    Alright that's it, I understand how it's working

    So the issue was that the first parameter was relative : item.opacity

    So whatever the math, the curve was constantly changing because of this relative value and so inevitably scaling down and down without never reaching its goal

    lerp is linearly interpolating a to b by x so a and b need to be "static" values so that they follow x function properly, knowing that x=0 will result the value being a and x=1 will result the value being b

    So :

    lerp(0,100,(Object.timer.currenttime("blabla")/blablaTime)^x)

    You will have a nice exponential acceleration from a to b for the duration of your timer.

    Thank you so much for your help

  • That totally makes sense, I try that now !

  • Hello world !

    I'm an animator and I start to make games with Construct2

    You can check my progress by following me on Twitter or my blog : twitter.com/ourotorrus

    Cheers!

  • 99Instances2Go

    Thanks for your reply

    Well there is a difference. The first curve shows that the value will quickly go toward its goal to finally reach it very slowly. The second one shows that the value will very slowly start toward its goal to end up reaching it really fast.

    I think the math solution you mention is the right way to do it, but I don't quite understand your suggestion : lerp(item.opacity,100,(dt^n)/m) ?

  • Hello,

    I try to animate some item opacity with events, I currently have this :

    every tick : lerp(item.opacity,100,dt)

    So it works, and the animation curve is something like :

    But I would like to make the opacity animation curve more like this :

    And I don't understand how to do it

  • Haha, yea I know...

    I am obviously open to any kind of service exchange as I don't have money, I can exchange my design/animation skills for sounds !

ourotorrus's avatar

ourotorrus

Member since 15 Jun, 2015

None one is following ourotorrus yet!

Connect with ourotorrus

Trophy Case

  • 9-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies