How to scale objects correctly?

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.
  • It works fine on my end, but it may be a CPU issue. Try storing the X-Scale as an alterable value on the ball instead, and compare to that alterable value instead of to the object width and height. Since both are scaling equally, you'll only need to compare to the one value.

  • I have tried it with variables already, also with counters but it does not work^^ If you cannot see it move the red ball more up, to the top of the screen, than press play, sometimes it depends also on the position of the object and how hard it hits the ground i have noticed. I dont think its my cpu because i test also on 2 android phones and its the same.
    Please login to see this attachment.

  • But i think i know already what the problem is, if you run the example, open the debugger and put in the Ball objects and look at the width and height of both. You will see the "Physics_Ball" is 64x64 but the "Ball_Sprite" size changes dynamically like crazy, thats the reason why fusion cannot set the scale correctly because its getting confused. Strange X)

  • Ohhh I see it now. I was able to get it to match up by having it look for XScale>0.25 (maybe adjust to 0.26 for a bit more visual precision), but for some reason comparing to OWidth is finicky. So it should look like this:

    Compare to Two General Values: XScale>0.25 - Set XScale to XScale("ball_sprite")-0.01, Set YScale to YScale("ball_sprite")-0.01

    And yes, actually, you don't even need the fast loop!

Participate now!

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