I have a working grenade script, but when you throw it, it just instantiates itself out and applies force up, and forward. The problem is, is that it just flies out, and stays in one place while its flying through the air. Is there any way I can make it so it looks more real, and kind of flips through the air or something? I have tried animating it, and every time I throw it, it appears where I recorded the animation.
You've asked 3 questions that could be easily solved just by searching Unity Answers, or just googling it, or even random experimenting, or just thinking about it. Just try looking around next time. Please try not to re-post questions. :(
The reason I'm asking is because I don't even know where to start searching. In fact, the last line I said was "I have tried animating it", which means I am experimenting.
Plus, I have been searching.
Well, that's good. I am sorry if I had offended. By the way, how did you originally have the grenade be thrown?
Dont worry about it. I should have been more clear. Anyway, I just figured it out. When I tried animating it, I animated the position, and the rotation. I should have only did the rotation. Now it looks fine.
Answer by Meater6
May 24, 2011 at 09:32 PM
Add a rigidbody for gravity and force. When you throw it, add force upward and forward relative to the person. To make it spin in the air (if that's what you want) add random torque to it. Or just make it rotate constantly, but that won't look that realistic on the ground.
I hope this helps.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
2 People are following this question.
3rd Person Throwing Grenade Question
Create an Enemy Animation
Can I make animations snap to a frame?
Unity 3 Animation Positioning Problem
Null reference and GetComponent