Active Object Coordinate math help.

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I have an active object which has different vertical sizing and action points/hot spots depending on it's animation frame. I'd like to use the Easing Object to make sure the "Y Bottom" of the active is always eased into the same coordinate. Basically, the bottom of the Active always touches a specific point, though its eased into that point.

    How can I accomplish this? This is an area where my math skills are really cutting me short. I just can't figure it out.

  • If Y Position Of Bottom Edge("Object") > Target Bottom Y
    -Set Y Position("Object") To (Y Position("Object") - 1)

    If Y Position Of Bottom Edge("Object") < Target Bottom Y
    -Set Y Position("Object") To (Y Position("Object") + 1)

    Fusion Veteran Since 2005. Example Projects: Please login to see this link.

  • Does the difference between the bottom of the active and the hot spot change throughout animations, or is it static?
    If its static, you need only replace the "X" in any formula with "X-N", where N is the difference between the bottom edge and the hotspot
    So if you had something like:

    Set Y position of object to:
    >Coordinate + (Y position of object - Coordinate)*0.9

    making it always line up with a bottom edge of +8 distance would simply be:

    Set Y position of object to:
    >(Coordinate + ((Y position of object + 8) - Coordinate)*0.9) - 8

    You could calculate that offset dynamically if it changes, but it might looks wonky if its changing by large amounts, the other trick is to have your object's animation resolve to something static in the time it takes to ease in, and then just use that as the static offset even if it wouldn't sync up with the previous frames.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!