Quantcast
Channel: Latest Questions by betaFlux
Viewing all articles
Browse latest Browse all 30

Random.insideUnitSphere doesn't work as expected

$
0
0
Does anyone know why this snippet returns a position around world space zero? (the transform is a child) float radius = 5; float zDistance = 5; targetPosition = new Vector3(Random.insideUnitSphere.x * radius, Random.insideUnitSphere.y * radius, zDistance) + transform.position;

Viewing all articles
Browse latest Browse all 30

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>