I’m hoping this is incredibly easy, but I’ve been smashing my head against a wall over this without much luck- let’s say I have three variables:
Vector3 PlayerLocation; //Represents current player location
float spawnDirection; //Always clamped between 0-360
float spawnRange; //Represents desired distance from player at which objects should spawn
What I’m trying to do is get a Vector3 representing a transform spawnRange distance from PlayerLocation in spawnDirection, where spawnDirection=0 corresponds to player.forward, 90 corresponds to player.right, and so forth. Is there an easy way to do this? I’m half-suspicious that the math is trivial, but I can’t quite suss out how to do it.