How do you create flying flies?
The flies are black sprites measuring 6x6 pixels.
They fly around a single point.
Develop games in your browser. Powerful, performant & highly capable.
Maybe the Orbit behaviour would work?
https://www.construct.net/en/make-games/manuals/construct-3/behavior-reference/orbit
Or if that's too simple, Timelines would also work:
https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/timelines
Maybe the Orbit behaviour would work? https://www.construct.net/en/make-games/manuals/construct-3/behavior-reference/orbit Or if that's too simple, Timelines would also work: https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/timelines
Thanks for the ideas. "Orbit" might work, unless other people suggest some other options.
There are two options, the parameters need to be adjusted for a realistic look.
fex.net/s/ebssado
A looser idea could be to have the fly always moving and just gradually rotate towards a target. Since it a fly we don’t mind it overshooting the target.
Every 0.25 seconds: — fly: set targetx to bag.x+random(-100,100) — fly: set targety to bag.y+random(-100,100) Every tick — fly: rotate 50*dt degrees towards (self.targetx, self.targety) — fly: move forward 50*dt pixels
Another idea could be to just have the fly move forward and randomly turn left or right. To make it turn smoother you could randomly affect the amount the turning rate changes per frame instead of changing the rate directly. All that’s left is to check to see if it leaves the area and steer it back.
Also in the same vein as the orbit behavior you could apply multiple sine behaviors to the fly to make a believable random looking motion.
There are two options, the parameters need to be adjusted for a realistic look. https://fex.net/s/ebssado
https://fex.net/s/ebssado
Thanks!
A looser idea could be to have the fly always moving and just gradually rotate towards a target. Since it a fly we don’t mind it overshooting the target. Every 0.25 seconds: — fly: set targetx to bag.x+random(-100,100) — fly: set targety to bag.y+random(-100,100) Every tick — fly: rotate 50*dt degrees towards (self.targetx, self.targety) — fly: move forward 50*dt pixels Another idea could be to just have the fly move forward and randomly turn left or right. To make it turn smoother you could randomly affect the amount the turning rate changes per frame instead of changing the rate directly. All that’s left is to check to see if it leaves the area and steer it back. Also in the same vein as the orbit behavior you could apply multiple sine behaviors to the fly to make a believable random looking motion.