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
1
Question by Ugo · Jul 13, 2010 at 03:06 PM · animationspriteplatformer

2.5 platformer sprite animated character

Hi, I'm trying to do a game with 2d graphics like Paper Moon. The character should be sprite animated, moving in a 3dmensional environment, giving a sort of paper mario feeling. I googled a lot about using planes, animating spritesheets, using the offset,even managed to use the code in the wiki, but what I can't understand is how to associate the animation to the controls.

How do I trigger the tiled animations (walk animation when walking, run animation when running, etc.)? Because my character can walk and jump, but it's not properly animated. I'm using the scripts contained in the 2d platformer tutorial.

Thanks in advance.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Tetrad · Jul 13, 2010 at 03:27 PM

I'm assuming that you would just be changing which material/animation/sprite/whatever you're using in the same place the 2D platform tutorial crossfades/plays different animations.

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 Ugo · Jul 13, 2010 at 05:03 PM 0
Share

I don't understand, is it something I need to put in the animation script? Lerpz, the default player, is given with a set of imported-animations of 3d models. The animation script seems to call the animations whenever is needed to. I've tried to make an animation using Unity built-in animator in which I change the offset of my spritesheet from frame 0 to 4. This way I could make an animation instance which could be triggered by the given script, but the Unity animator seems to try to blend the frames together, not displaying them instantly like the code I took on the wiki.

avatar image
0

Answer by Ehren · Jul 27, 2010 at 05:45 PM

Try page 12 of the Evac City tutorial.

Using the built-in animator is probably not the way to go, since you need to "snap" the material to a particular offset. Doing this in code is much easier.

You could do this in a separate animation script, or you could simply modify the PlatformerController. Look for the part of the script where movement is happening, and just add your own code to check isGrounded, isMoving, etc. and change the texture offset accordingly.

To get the proper framerate for your animations, you can store Time.time whenever you change the offset and then make sure a certain amount of time has elapsed before changing it again.

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 nantas · Aug 12, 2011 at 02:50 PM

check out this new tool set called ex2D: http://www.ex-dev.com/ex2d/index.html

it's very easy to use and use the same workflow to create 2D content as other Unity built in tools.

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

1 Person is following this question.

avatar image

Related Questions

Sprite Manager Play animation 0 Answers

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

Spritesheet and 2D control 0 Answers

How to Change to the Same Point in Another Animation 0 Answers

How to deal with an animation from sprites of different sizes? 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