getting an actor to move organically within 2 points
digitalzero
Member, BASIC Posts: 639
So basically I'm trying to make a butterfly actor but i want the butterfly actor to move within a minum x and y and a maximum x and y ( pretty much within a box) does anyone know how i can achieve this?
Comments
Maybe this thread will help:
http://forums.gamesalad.com/discussion/76466/looking-for-random-hummingbird-type-movement
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@digitalzero Yeah, just use the demo from jamie's link and drop your animation into it. Fool around with the code and you can get a nice random flight out of it.
Thanks so much you all!!!! I appreciate it!!!
Here's one way you could implement this idea so it was quick and easy to set up when you are designing a game - you could have four lines on the screen, two vertical, two horizontal, you set them up as a rectangle, positioned/sized however you like, as soon as you run your project these lines are destroyed and the butterfly will then only float around within the area you set with the lines.
Demo of this idea attached:
Move the four 'walls' (the lines) around to define the area of the rectangle, then hit play, the butterfly leaves a trail, this is just to illustrate its path - each time you play the project the butterfly take a random path.