Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by IPTN · Jul 25, 2011 at 06:28 PM · particles

Manually Positioning Particles doesn't work

I already looked at this previous question:http://answers.unity3d.com/questions/16088/setting-particle-position-does-not-appear-work.html However even if I set particleEmitter.particles[0].position.x = 5; directly it still does not work. Very puzzled by this. Currently I have attached to a blank gameobject:
a very tiny ellipsoi particle emitter which emits one particle with no velocity, 0 for the minenergy and maxenergy so it never disappears, and oneshot on
a particle renderer with nothing changed
this script:
`function FixedUpdate(){`
a = particleEmitter.particles[0].position.x = 5;
Debug.Log(a);
Debug.Log(particleEmitter.particles[0].position.x);
`}`

The particle does not move, 'a' returns 5, and the second Debug returns the position of the emitter as if the particle had not moved which it hasn't. Can anyone explain? Or provide an example which works?

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 Eric5h5 · Jul 25, 2011 at 06:44 PM

As with all cases like this, you have to get a copy, change the copy, then assign it back. (See the docs.)

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 IPTN · Jul 25, 2011 at 06:48 PM 0
Share

Thanks for the advice. Sorry I didn't specify clearly I tried the answer given to the other question already: var particle : UnityEngine.Particle; particle = particleEmitter.particles[0]; function FixedUpdate(){ //Debug.Log(particle.position); particle.position.x = 5; particleEmitter.particles[0].position = particle; Debug.Log(particleEmitter.particles[0].position); }

But got the same result. Thanks for the quick reply.

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

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How do I use emissionRate in scripting? 1 Answer

Timetrail script creating 2 trails and not destroying the second 0 Answers

help in animation/code 1 Answer

How do i script a particle effect to start? 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