Dotted Line Math Question
I would like to draw a dotted line on a map between two actors. Actor 1 on is located at X1,Y1 and Actor 2 is located at X2,Y2. Is there an elegant way to draw a line of dots from Actor 1 to Actor 2? And then from Actor 2 to Actor 3, which is located at X3,Y3? And so on and so forth.
One more thing to add.. The distance between the actors is never the same, so the number of dots will vary, but the distance between each dot should always be the same.
Best Answers
-
Hopscotch Posts: 2,782
a dotted image, set to tile, and some maths. Project attached
Btw, I used a 0 timer, in stead of constrains, for readability.
-
MentalDonkeyGames Posts: 1,276
@Hopscotch said:
@vikinga dotted image, set to tile, and some maths. Project attached
Nice!
Here´s my version that uses the Replicate behaviour instead of resizing the actor.
(I rudely drag'n dropped a few behaviours from your project )
Answers
Yep, cool @MentalDonkeyGames !
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Wow! Thanks Gentlemen! I will take a look and see if I can figure out what you were doing and translate it into my game. Very cool! Thanks!