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 Cap · Jun 02, 2010 at 12:43 AM · rotationvelocityparticle

Rotating emitter direction whilst maintaining particle velocity

I have a ship that rotates and moves along its z axis with an ellipsoid emitter attached as a child. The emitter rotates as the ship does, and spews out particles along its Local Axis z value, when the ship is stationary, however when the ship is in motion the particles follow the ship's velocity vector (ie local z) rather than its current rotation about the y axis. This leads to the ship facing in one direction and its particle stream following its movement along another instead. I find this odd, since the emitter's z axis must be rotating about y to match that of the ship when the ship is still.

So, why is it doing this, and how can I make my emitter's local z axis (or whatever it uses for the Local Velocity z axis value) match that of the ship's at all times?

Thanks.

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
1
Best Answer

Answer by Murcho · Jun 02, 2010 at 01:05 AM

The best way is to make the particle emitter a child of the ship, so then it will follow constantly and alway be in the correct position. You should also set the emitter to simulate in world space so that when the space ship turns the particles far from the ship don't turn with the ship.

There is a section in the 3D Platforming Tutorial on how to set this kind of system properly if you're interested in more details. It's in the first half of the tutorial, so shouldn't be difficult to find, just look for the section on setting up Lerpz's jetpack.

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 Cap · Jun 02, 2010 at 02:04 AM 0
Share

Yes, I've already done both those things and it isn't working. It's obviously following the z axis of the ship since adding transform.rotation.z=transform.parent.rotation.z has no effect and the particles follow the correct line when the ship rotates and is still, but the movement seems to somehow break it (also breaks with the above code attached).

avatar image Cap · Jun 02, 2010 at 02:12 AM 0
Share

Addendum: I see what the problem is now, it's related to the other problem I'm having: http://answers.unity3d.com/questions/11433/problem-matching-particle-object-velocities-speed

The particles are, in fact, facing in the correct direction but they're still inheriting the forward velocity of the ship as they emit. I'll mark this as solved, despite it depending on a fix for the other problem.

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

No one has followed this question yet.

Related Questions

Rigidbody slowing right down when colliding only when I'm rotating the velocity to always be going forward 1 Answer

Is Particle.axisOfRotation editable in particle system editor? 0 Answers

rotate object until rigitbody.velocity is facing the target 1 Answer

relative velocity of rigidbody according to rotation... 1 Answer

Some lines of codes are ignored once certain "if" statement(s) initiated. 3 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