Quantcast
Viewing all articles
Browse latest Browse all 101

Instantiate enemies around player

Hey everyone! First post, pretty new to Unity... I've had plenty of experience coding in Flash (AS3) and i know it's pretty similar to Javascript so i'm doin my best to my move skills from one to the other... But i'm attempting to make a game, and my player is standing in a particular spot and can spin 360* to look in any direction... Basically i want to spawn enemies around him at a distance of 50m away from the player... and i need the enemies to be facing the player (as they walk forward towards him) I saw some code to make the enemies spawn within a circle, but that doesn't keep them at a fixed distance. So the player is in the middle, enemies spawn at a radius of 50 from the player (in any direction around the 360* and when Instantiated, they need to be facing the player... How would i go about doing this? Thanks guys! (and girls)

Viewing all articles
Browse latest Browse all 101

Trending Articles