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 Ryoni · Nov 23, 2010 at 08:32 PM · animationmovementjumpframe

Moving during jumping animation

So the case is that I have a 36 frames long jumping animation and the jump itself starts at frame 12, where my object raises along y axis.

1) What would be the most easiest way to move my object forward while it's in air(during frames 12-36)?

2) How is jumping with animation generally done in games? I don't think my way is the best one.

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 IJM · Nov 23, 2010 at 09:54 PM

2) Jumping animation is combination of animation and object movement. In every frame the center of the mesh should be on x0,y0,z0. and you shoud move the GameObjec on the y axis and not the mesh it self.

1) You can use transform.forward to get the direction vector and apply the force in that direcion. (you sould disable rotetion if you want a realistic jump)

Comment
Add comment · Show 6 · 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 Ryoni · Nov 24, 2010 at 08:39 AM 0
Share

Hmm yes. I should probably move the object in the jumping code.

I'm familar with transform.forward but how would I make it work only at frames 12-36? Is there a way to check which frame is going in the animation or should I somehow add like half a second in the begining where the character doesn't move, again somehow?

avatar image IJM · Nov 24, 2010 at 10:19 AM 0
Share

You need to make a jumping animation that will be able to loop while the player is in the air, and not vice versa.

avatar image Ryoni · Nov 24, 2010 at 01:08 PM 0
Share

Thanks. So let's say I have a bouncing animation followed by the loopable jump animation. How would I move my object just during the jump animation?

avatar image Ryoni · Nov 24, 2010 at 07:24 PM 0
Share

Figured out that I can start at wanted frame with animation["myanim"].time = ("total frame amount"/ x); But I'm still looking for a way to move my object just during the animation. Can't be that hard..

avatar image IJM · Nov 24, 2010 at 09:12 PM 0
Share

I recommend that you use Rigidbodys and AddForce, if you make your movement with physics your player will move in the air after running. (Becouse of the low friction) If you jump from the place, the player will stay on the place.

Show more comments

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

How To Lock Direction While Jumping? 1 Answer

Time Delay Animation 1 Answer

why will my jump animation only play on multi-jumps? 0 Answers

Sprite Animator (walker boys)- Jumping 0 Answers

RTS movement with walking animation. 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