Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 Peterwerd · Sep 23, 2014 at 09:22 PM · animationcharacterparticleweapon

Particle System staying at the tip of my weapon during animations

Hi everyone,

I'm trying to get a particle system to stay at the tip of my characters wand. If googled and looked around and a lot of people say "just drag it in the hierachy on to the bone and it will follow". Well I did that and positioned the ps on the right place and it follows my characters but it's not really following exactly.

So now if put a small sphere in blender3d at the tip and it follows nicely when I play the different animations.

My idea was that I could write a script that gets the position from the small sphere which is an extra object and child of my char in unity and use it to apply it in update to the particle system.

Can anyone confirm that this way would be possible or what would be the best practice for something like that?

I've tried to script it but I'm just starting to try scripting my self so I have no Idea if it's just not possible or I just suck at scripting ;)

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Cherno · Sep 23, 2014 at 09:43 PM

If you make your particle object a child ob any other object (like, say, the weapon), it will always stay at the same exact relative to it's parent. For a weapon muzzle flash, I would just make it a child of the weapon, and move it to the weapon object's model's muzzle and rotate it the right way. You can do this via script with

muzzleflashObject.transform.parent = weaponObject.transform

I don't understand you alternative approach, you never explain what the "small sphere" is or what it's supposed to do.

Comment
Add comment · Show 2 · Share
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 Peterwerd · Sep 23, 2014 at 09:57 PM 0
Share

thank you very much. I added the sphere in blender at the tip of the wand so it would act as my muzzleflashObject.

I already had the particle object as child of the sphere (which moves with my animation) it laso moves but with a slight offset. But I didn't had a script on it. I thought it would work without.

I will give it a try.

avatar image Cherno · Sep 23, 2014 at 10:30 PM 0
Share

If the particle object is a child of the weapon object, then it shouldn't be neccessary to use any further code. Not sure where the slight offset comes from.

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.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

What is the better way to set up a character with a weapon? 1 Answer

Switching weapons animation with mecanim? 2 Answers

Character Equip Animation 0 Answers

Realistic weapon movement with the character 0 Answers

Animation system 1 Answer


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