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 Itchigon · Apr 11, 2013 at 04:30 PM · animationtransformpositionparticles

Animation won't play when changing position

I am using the Shockwave animation found in the Simple Particle Pack - https://www.assetstore.unity3d.com/#/content/3045

I have dragged the animation onto my hierarchy view and positioned it in the middle of my GUI. What happens is the animation will play on awake as that is set to true, however when I try and move the prefab to a particular location in the code and then call Play(), nothing happens.

Here is the setup of the positions and the particle system:

 public ParticleSystem cardTakenAnimation;
 
 void setBoardPositionsForAnimation()
     {
         //1-1, 1-2 etc...
         boardPositions[0] = new Vector3(-235.5366f, 160.0073f, -220.0208f);
         boardPositions[1] = new Vector3(-32.19697f, 160.0073f, -220.0208f);
         boardPositions[2] = new Vector3(190.058f, 160.0073f, -220.0208f);
         boardPositions[3] = new Vector3(-235.5366f, -133.1802f, -220.0208f);
         boardPositions[4] = new Vector3(32.19697f, -133.1802f, -220.0208f);
         boardPositions[5] = new Vector3(190.058f, -133.1802f, -220.0208f);
         boardPositions[6] = new Vector3(235.5366f, -407.4523f, -220.0208f);
         boardPositions[7] = new Vector3(32.19697f, -407.4523f, -220.0208f);
         boardPositions[8] = new Vector3(190.058f, -407.4523f, -220.0208f);
     }

Here is what I am doing when a certain event happens in order to move the particle system and play the animation.

 cardTakenAnimation.transform.position = boardPositions[0];
 Debug.Log("Position: "+animationObject.transform.position);
 cardTakenAnimation.startColor = Color.red;
 cardTakenAnimation.Play();

I'm finding that the Debug.Log is printing the correct position, but no animation is playing which I find odd. Does anyone have a clue as to what I'm doing wrong?

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

0 Replies

· Add your reply
  • Sort: 

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

10 People are following this question.

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

Related Questions

What is causing my attack animation to be in a different position from my idle/run animation? 0 Answers

Cinema 4d to unity (Transform/position) 1 Answer

Transform position in animated model 1 Answer

Simple animations - hardcoded or import animation 1 Answer

Animation Clobbers Position 2 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