Paul Green
Member
Hey All,
Trying to get my head around some logic, I'd like to be a circle, and walk up to a square, and while pressing and holding left shift, I'd like the square to stay attached to the front of the circle and move with me. Then letting go of left shift, the square would be left were I released.
I know how to do the collision, the holding the left shift to make the square move, and all that good stuff... the one thing that has me baffled is how to keep the square in front of my circle, no matter what direction my circle is facing. I'd like the square to be a square size away from me, so if the square was bigger, it wouldn't look odd, if I used the same 'base routine'
Can anybody point me in the right directions, I've looked at the point_distance, lengthdir_x and those routines, but I don't know how to use the 'maths' to get the new x and y of the square so, if I rotate the circle, the image_angle (or direction) could be used to generate the x and y of the square.
Hope someone can help.
Trying to get my head around some logic, I'd like to be a circle, and walk up to a square, and while pressing and holding left shift, I'd like the square to stay attached to the front of the circle and move with me. Then letting go of left shift, the square would be left were I released.
I know how to do the collision, the holding the left shift to make the square move, and all that good stuff... the one thing that has me baffled is how to keep the square in front of my circle, no matter what direction my circle is facing. I'd like the square to be a square size away from me, so if the square was bigger, it wouldn't look odd, if I used the same 'base routine'
Can anybody point me in the right directions, I've looked at the point_distance, lengthdir_x and those routines, but I don't know how to use the 'maths' to get the new x and y of the square so, if I rotate the circle, the image_angle (or direction) could be used to generate the x and y of the square.
Hope someone can help.