Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Aeleas

Shotgun bullets ?

Question

Hi.

I'm trying to make bullets for my shotgun. For one single bullet, what I do is create one empty object and add script, rigidbody, sphere collider and tagged as "bullet". Inside it  my "bullet" particle system. Then I clone this object as one single bullet.

ble.png

For shotgun, I change the number of bullets that particle system release at once.  But I need to make every particle have script, collider and tagged as "bullet" ? Is this possible ? Or I do it on wrong way ?

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 1

Respectfully I think that you have to change your way of mind it...

In a previous project I used a simple tagged bullet prefab which was intantiated x times, applying a randomized force and angle.

Only set prefab bullet and dispersion. Take a look at this part - I hope that it can help you ++

 

Please login or register to see this code.
  • Thanks 1

Share this post


Link to post
Share on other sites

  • 1

You should think the other way around. Not every particle have to have a collider/script, every bullet object (which has the collider/script) should have the particle system. It's just the visual representation of the bullet.

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

that or make it completely seperate. for example do the functionality with raycasts and the optics with one particle system. I think that would be the cheapest way to do it 

 

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

I was thinking on the same thing but I don't know how to fix the angle of bullets. You did it in simple way. 

Thank you geckoo.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...