Hi guys, I want to create a "Measure Gun" which fires a laser beam and then prints the distance between the gun point and the hit point. Heres my code
I attached this script with the gunPoint(gameobject from which laser is fired). But the problem here is that the other end of the laser beam gets snapped to certain points.. The gunPoint end is fine but the other end is not smooth...
Oh ya, Thanks man, now i see i have an invisible rogue collider in the middle of the scene for no reason. dont know why i created in the first place.. After deleting it, the code works fine.. Also i got rid of hit.point and used hit.distance and now everything works as intended... Thank u very much man..
PS: I love your site www.unitygems.com... great work man..
answered Dec 27 '12 at 10:10 AM