How to save coordinates when moving and scaling object

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 would like to find out from you the next information. Can you advice how to save coordinates when moving and scaling one object in relation to another?
    There is an object 1, it moves along the X axis, there is an object 2, it does not move.
    There is a zoom button by clicking on it, both objects decrease by half. How is it possible to keep the coordinate on X of object 1 with respect to object 2?

  • At it's simplest you just need to scale the difference in x and y at the same time as you scale the object. This mfa has one object as the centre and scales the other two objects including the offset.I've also scaled the movement speed.
    Please login to see this attachment.
    for a game engine you'd probably want to separate to the zoom you're at and the zoom level you're going to. Values are your friends

  • At it's simplest you just need to scale the difference in x and y at the same time as you scale the object. This mfa has one object as the centre and scales the other two objects including the offset.I've also scaled the movement speed.
    Please login to see this attachment.
    for a game engine you'd probably want to separate to the zoom you're at and the zoom level you're going to. Values are your friends

    Thank you very match, mate!

  • At it's simplest you just need to scale the difference in x and y at the same time as you scale the object. This mfa has one object as the centre and scales the other two objects including the offset.I've also scaled the movement speed.
    Please login to see this attachment.
    for a game engine you'd probably want to separate to the zoom you're at and the zoom level you're going to. Values are your friends

    Thank you for your help, but can you advice with another small nuance.
    If you make object 2 Drag and Drop movement and move it, how to make it so that object 1 also always moves with it? At the same time, "zoom" should also work.

  • Six new values, 4 on the drag object, StartX and StartY( which pick up you position at the beginning of the dragging) and CurrentX and CurrentY(which allow you to keep track of how far the drag object has moved) then OffsetX and OffsetY on the moving object to keep the space between the two objects constant.
    Please login to see this attachment.

  • Six new values, 4 on the drag object, StartX and StartY( which pick up you position at the beginning of the dragging) and CurrentX and CurrentY(which allow you to keep track of how far the drag object has moved) then OffsetX and OffsetY on the moving object to keep the space between the two objects constant.
    Please login to see this attachment.

    Thank you for your advice. I meant a little bit another thing but this variant is even better. I thought a lot and made exactly as i wanted, using your example. Once again, thank you for ideas.
    My variant Please login to see this attachment. may bee someone needs.

Participate now!

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