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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by fgielow · Jul 28, 2012 at 11:38 PM · rotationparticlesparticlesystemparticleshuriken

Changing startRotation from ParticleSystem on script does not work

Hello!

I am spawning "meteor" objects in my game, they have a tail formed by a ParticleSystem. However, the particles must be orientated in a specific direction, hence, I try to set

 meteor.GetComponent<ParticleSystem>().startRotation = myRotation;

on script, so that every created particle is on the direction I need. However, the value that I see updated on the Live Editor does not match with what I input (even when % 360).

When I try printing that value by script after setting it, it prints out correctly. But when I check that value on the live editor, it is completely different. If I change that value on the Live Editor to the one I want and ask it to simulate my particles, everything works greatly and my particles appear in the correct orientation.

What can be happening here? Is the startParticle be somehow changed after I set it? Should I change it through any other means but manipulating it directly?

Thanks in advance. Fernando.

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 tenfour04 · Aug 25, 2012 at 03:36 AM 0
Share

I have the exact same problem. For example, when I programmatically set startRotation to 23.5898, it is actually changed to 1351.596 in game. Did you ever figure this out?

avatar image ScroodgeM · Aug 25, 2012 at 09:06 PM 0
Share

23.5898 and 1351.596 are the same value in radians and degress. so search into which measure units used in methods you use.

1 Reply

· Add your reply
  • Sort: 
avatar image
5
Best Answer

Answer by tenfour04 · Aug 26, 2012 at 12:51 AM

I discovered that when you set the value in code, you should enter your desired value in radians. It is converted to degrees before it is displayed in the inspector. When you enter it in the inspector, just use degrees.

Comment
Add comment · Show 1 · 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 mantrid · Feb 03, 2014 at 07:57 PM 0
Share

thanks! it worked :)

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

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Resetting non-looping particle system 5 Answers

Scale Shuriken Particle System with Parent Transform 5 Answers

How to destroy live particle in Shuriken 1 Answer

IsFinite(outDistanceAlongView) Error 1 Answer

What could cause OnParticleCollision to fail? 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