Hey! How can I make object for example - circle float randomly, but not to go outside layout?
Develop games in your browser. Powerful, performant & highly capable.
Yea, but object can only move horizontal OR vertical how to make the object float randomly?
You can give it two sine behaviors, one for horizontal and one for vertical. <img src="smileys/smiley2.gif" border="0" align="middle" />
You say 'float randomly'.
Tell us more exactly, or give us an example to receive more useful advice.
Exactly as Sully said.... Also put some randomness at magnitude and you're done...
If you need REALLY randomness (all around the layout), then i suggest you to spawn it randomly between some points while having the sine behaviours...
Thank you guys!