Quantcast
Viewing latest article 29
Browse Latest Browse All 90

how to increase the rayspheres radius

so the script i have is suposed to render everything thats being hit i want to increase the radius but its not working ![alt text][1] [1]: http://answers.unity3d.com/storage/temp/1112-spheres.png as you can see the upper half of the picture is what im getting but number two is what i want everything inside the camera area or the red area should be rendered function Update () { var hit : RaycastHit; var charCtrl : CharacterController = GetComponent(CharacterController); var p1 : Vector3 = transform.position + charCtrl.center; // Cast a sphere wrapping character controller 10 meters forward, to see if it is about to hit anything if (Physics.SphereCast (p1, charCtrl.height / 2, transform.forward, hit, 10)) { distanceToObstacle = hit.distance; print(distanceToObstacle); hit.collider.SendMessageUpwards("Render", 1, SendMessageOptions.DontRequireReceiver); } }

Viewing latest article 29
Browse Latest Browse All 90

Trending Articles



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