- Home /
Sphere spawn from border in direction (2D)
Hello, I have question about sphere spawning.
I have player object in centre of camera (green dot in image), I need to spawn enemies from blue border in image, that will have random direction "nearly" (sometime directly) to player by rigidbody2d.AddForce
I also have rotation of enemy
rigidbody2d.angularVelocity = Random.Range(-1.0f, 1.0f) * tumble;
I need that he will keep rotate and this random direction
How I can do that? Thank you!
spawning.png
(49.2 kB)
Comment