Directional Positioning Math Problem

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.
• Say if you want something positioned at a distance away from an object according to its direction, and at an origin different from 0. You'd do:

Object 1:

Set position to 0,-64 of Object 2 (located)

This way, whatever direction Object 2 is facing, Object 1 will be attached 64 pixels above it in accordance to its direction. In this case, it's assumed the direction is 0, or facing right/east. Thus, if Object 2 is facing left/west, then Object 1 will be positioned 64 pixels below it. The position rotates.

What I need to figure out is how to do that with an expression, finding the X and Y coordinates of what this relative position should be, and then moving secondary objects towards it with only arrays (static movement).

• Hi

I'm not quite sure what you are asking for but I made an example of how you can position an object a certain distance away from another depending on the objects direction.

See the attachment.