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 mister.keith · May 03, 2012 at 06:03 PM · animationgame objects

Making objects "bounce"

I'm currently working with a group of cube (Game Objects) and when the player interacts with it I am trying to have it "bounce" and slightly go down on the y-axis and come back up in the span of 1 second. I successfully applied this to one cube and now I doing the same for all the other cubes but for some reason the other cubes will not only animated on the y axis but also on the x-axis (even though I haven't even touched that part of the transform part in the animation window.

Does anyone know how to make this cube drop without it swirling all over the place?

::edit:: I have already checked the orientation of the game object and the y axis is what is supposed to be moving :)

Thanks!

alt text

alt text

[3]: http://answers.unity3d.com/storage/temp/809-Screen+Shot+2012-05-03+at+1.30.43+PM.png

Screen Shot 2012-05-03 at 1.30.43 PM.png (102.0 kB)
Screen Shot 2012-05-03 at 1.32.50 PM.png (270.8 kB)
Comment
Add comment · Show 3
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 GC1983 · May 03, 2012 at 07:42 PM 0
Share

Im going to take a stab at this with the info given. From the looks of it, this game is 2d. Do you have rigidbodies attached to the objects? Are you actually using the physics to create the bounce? Or are you just animating them? If youre using the rigidbodies, youll have to lock the rotations of the objects.

avatar image mister.keith · May 03, 2012 at 08:43 PM 0
Share

Yeah, the game is 2D and I'm not using physics to create the bouncing effect I'm animating them to make them look like they are bouncing. Essentially just moving it along the Y axis slightly so when the play touches that node, it will depress like a button would.

avatar image sriram90 · May 04, 2012 at 07:02 AM 1
Share

you can do this simply by scripting with out physics using only by movements. check once iTween for movements, it'll give the same what you're trying with animations.

3 Replies

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

Answer by mister.keith · Jun 02, 2012 at 08:29 PM

I ended up using the Punch effect on iTween thanks to sriram90. Worked the way I wanted it with minimal effort. Thanks for the help!

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

Answer by stingman · May 04, 2012 at 06:39 AM

Animations can be tricky. Sometimes it just takes a lot of playing around but first:

Check each frame of the animation and look at the X position. If the x position of your cube is not where it's supposed to be then move it back to your desired position and record over that keyframe. Might seem time consuming but it works.

You could also just script this effect quite easily. For what you're trying to do I would suggest just doing it in code unless there's something specific you're trying to accomplish in the animation.

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

Answer by Wolfram · Jun 02, 2012 at 09:05 PM

In the animation window, click on the red mark next to "position.x", and choose "delete key". Do the same for "position.z". Now the animation will only modify the y values.

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 Wolfram · Jun 04, 2012 at 12:25 PM 0
Share

Woops, I meant "delete key", not "delete curves". I fixed it in my answer.

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

7 People are following this question.

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

Related Questions

Can the animation editor create local rotational data? 3 Answers

Adding animation clips via script 2 Answers

Can I make animations snap to a frame? 1 Answer

How to select an animation clip by index number? 7 Answers

how to collide .fbx animation in unity 0 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