• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by TheTechZone · Dec 11, 2010 at 12:59 PM · third-personexplosionthrowgrenade

3rd Person Throwing Grenade Question

Hi all! I'm currently developing on a game called Three Worlds, a 3rd Person game. Everyt$$anonymous$$ng is all set up, the levels, player etc. Now i want to get started on weapons. I've decided to start off with the grenades. I managed to create a 'throwing grenade' animation for the character and now here's the tough bit.

Just as i click the button to throw the grenade (Left Mouse Button), the grenade appears when the character animation looks like as if he is throwing the grenade and the grenade is then thrown somewhere, like force is applied to it with the rigibody attached, and after about 3 seconds, the grenade explodes.

I've managed to create the models, the explosion particle effects but i want to know the coding for t$$anonymous$$s to work. I'm not much of an experienced scripter so i'm not exactly sure what to do.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Scribe · Dec 11, 2010 at 01:09 PM 0
Share

Have you made the animation using bones if so you can easily parent the grenade to your hand bone to make it follow the movement of the arm. so you instantiate at transform.position of the bone. then you could try checking the speed and detach it with this force not sure if it would work though. just an idea

avatar image Rabwin · May 10, 2011 at 10:01 PM 0
Share

Also you can give it a layer like grenade, and go into the physics options and turn off physics between the player and the grenade to ensure that your model doesn't interfere with it.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Make grenade roll out when it leaves hand 1 Answer

How to angle projectiles depending on where the mouse is clicked ? 1 Answer

Only 2 Grenades 2 Answers

2D explosion that targets specific gameobjects 1 Answer

throwing objects by pressing a button 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges