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 Catlard · Oct 28, 2011 at 12:29 PM · animationrigidbodyaiplatformerspritemanager2

Detecting the right time to play a landing animation?

Hey, so, here's an interesting problem. I've got a 2D sprite, in a platforming game (I'm using SpriteManager 2). The main character relies on a rigidbody to handle physics. I have a sprite animation sequence that I want to play whenever I get a certain distance from the ground, or whenever the player approaches the ground. I can change the framerate that the landing animation plays. I haven't yet figured out a solution that solves all three of these problems:

1) The character can land on a platform by jumping up to it, meaning he will not land at the same height he started at. 2) The character can land on something by falling down to it from a higher platform, meaning, again, that he doesn't end up at the same height. 3) The character can jump at a range of heights--so putting a cube below him that detects when it hits the ground (and thus triggers the animation) doesn't really work correctly.

The way I'm currently attacking the problem is via the method mentioned in problem 3. Any idea of a better solution?

Comment
Add comment · Show 1
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 Maisonadam1994 · Apr 10, 2013 at 06:15 PM 0
Share

i have the same problem

1 Reply

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

Answer by Dracorat · Apr 10, 2013 at 06:18 PM

I would say 3 is mostly right, though I'd do it with a series of cubes so that you can tell if you're about to land in the direction you're travelling.

Other possibilities include calculating position ahead of time (if you're doing your own calculations which it doesn't appear- just being sure).

Or creating a landing "field" around the platforms that when the character crosses in to, it changes 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

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

Detecting the right time to play a landing animation? 2 Answers

AI & pathfinding for 2D platformer - how to approach? 0 Answers

A* Pathfinding project with mecanim animation 0 Answers

Simple Rigidbody2D controller (Platformer Jump) 0 Answers

Enemy Ragdoll help 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