Velocity VS Sleeping

0 favourites
  • 6 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Can someone please explain the difference between Velocity X = 0 & Velocity Y = 0, and physics sleeping?

    I have an object that I want to fade out when it is not moving at all... which I thought sleeping did. It doesn't work. I then tried to compare Velocity X and Y, but the conditions were not there. I therefore had to create variables to store these values (which I thought was a bit odd), and set up an event which fades the object out when the X & Y both equal 0.

    This works.

    So yeah, please can someone tell me the difference, and why there aren't simply conditions to check the object's current velocity?

    THANK YOU!!!

  • What objects really need is the 'pick by comparison' condition that CC has. Then you can just plop in any expression an object has and compare it.

    Unrelated, but it would also be nice to have an expression for an object's scale.

  • And Opacity <img src="smileys/smiley20.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What object are you referring to that doesn't have an opacity expression/condition?

  • Oops, my bad... Not sure why I thought that wasn't there.

    Still, do you happen to know the difference between velocity equalling zero and sleeping?

  • AFAIK the difference between sleeping/velocity at 0 is like the difference between setting an object's opacity to 0 and setting it to invisible. If it's visible with the opacity at 0, the graphics card still does all the work of rendering it. If it's invisible, it skips rendering it completely - though the object still has some overhead so enough sleeping objects will still affect the framerate eventually. I think it's similar to that for the inclusion of which objects are calculated by the physics engine.

    (I'm not entirely sure about that, but that's how I think it works.)

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