- Home /
Gun problem : Force of bullet must be really high to work, but it is affecting character
Im making a game involving guns. I have it set up so the gun fires bullets, but for the bullet to fly at a 'bullets speed' it has to be up at like 10'000 force. This is making the player walk really slow when walk+firing plus if you jump or are shooting a close wall it throws you around the map a fare bit. Is there anyway to make this force only work on the thing the bullet is IMPACTING and not on the 'Launcher'?
Cheers :)
Answer by softrare · Sep 03, 2012 at 12:42 PM
Try using raycast for that, it is much better for performance and the shooting gets much more predictable (also you can program a specific effective range for the bullet).
http://docs.unity3d.com/Documentation/ScriptReference/Physics.Raycast.html?from=RaycastHit
Answer by andrewx33 · Sep 04, 2012 at 02:47 PM
Thanks, worked like a dream :)
Happy to help ;) Would you mark my answer as accepted then?
Your answer
Follow this Question
Related Questions
Transform.position bullet won't align 1 Answer
how to make bullets apply damage 1 Answer
How to add Bullet Velocity 1 Answer
Rigidbody bullets won't spawn at gun barrel... 2 Answers
Dart/Bullet comes out pointing up 1 Answer