moving towards a direction in a circular pattern.
Icebox
Member Posts: 1,485
Hello , I did a small animation to describe what i want cause it might be confusing from the way im saying it.
I want the black circle to move towards the red circle like the example below. This was done in flash but i want to do the same in gamesalad. The red circle moves randomly on screen and the black should follow it. I can do vector to angle to constrain the rotation of the black circle to the red circle , but i don't know how to move the black circle towards the direction of the red circle.Can Anyone tell me how to do this in GS ? to move the black circle so that it always follows the red circle. I hope i make sense.
Thanks
Comments
With the new COM control this is going to be very straightforward, but for the time-being you can simply make the black circle actor a long rectangle with the black circle positioned at one end - then use Rotate to Position to track the red circle.
Oh I never used rotate to position before I'll check it out now thanks @Socks
Com is already available to test with in the current version you will just need the pin function to handle any collisions or use gravity.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@Lost_Oasis_Games Yea I watched your tutorial i remember now it should work that way, , i stayed for couple of hours thinking about max and min and trying to figure out a way to constrain the black circle to the yellow circle and have it move towards the target , kept searching earlier threads until i lost it and decided to ask and im glad i did. Saved me the headache but i still want to know how to constrain its max and min position to the circle in case i use it for future purposes, but this is good for now.
@Icebox -- here is one way to do it with constrain behaviors:
@RThurman Thanks alot , it worked
You are welcome!