what's the best way to spawn actors in a random place around the moving camera?

-Timo--Timo- Member Posts: 2,313
I am making a game where the player (actor with control camera)
I want the camera to spawn clouds around the player in a random place.
what's the best way to spawn actors in a random place around the moving camera?
I'm now using
every 1 sec
spawn actor 'cloud'
x=random(cos(self.rotation)*600,cos(self.rotation)*800)
y=random(sin(self.rotation)*600,sin(self.rotation)*800)
this code works good but its still laggy and when you dont move for a while there are too much clouds...
does someone know a better solution for this?
hope I explained enough ;)

Comments

Sign In or Register to comment.