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 $$anonymous$$ · Sep 05, 2014 at 10:49 PM · animation2dspriteprogrammingsprite sheets

How to create animated "sprites" in a 3D environment

Hey everyone :-)

So, I'm currently toying with an idea to a simple shoot-em-up game that will have a graphical style of basically 2D sprites walking around in a 3D world. A quick example I sat up is this:

alt text

Where the stickman in this case is just a plane with a texture on it, to give it that retro 2D sprite look. However it will not be a 2.5D game, as you will be able to move on all axes (so this includes depth, too).

Basically, since I've been away from Unity for quite a while, I'm contemplating how the most practical approach would be with a game like this.

That is, can I make use of Unity3D's new 2D framework to achieve this? This way I would be able to make use of all its wonderful in-built sprite sheet and animation tools, which would be awesome. However, I wonder if it's possible to make Unity sort these sprites by depth instead of simple sorting layers?

The other route might be to simply make an animation system where you texture quads with a sprite sheet and then flip through the frames by changing the UV map coordinates or something of the like.

I'm simply wondering what approach you more experienced Unity developers would take here? Is it possible to use the new 2D framework to achieve this, or would I have to use something like quads and planes and then build an animation system?

Thank you all for your help!

example.png (93.7 kB)
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 fafase · Mar 29, 2015 at 08:54 AM 0
Share

Well yes you can, just use a perspective camera.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by jpelletier · Dec 29, 2014 at 10:39 PM

You should be able to accomplish what you are looking for with UGUI by using a canvas object with the worldspace option.

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 hav_ngs_ru · Dec 29, 2014 at 06:49 PM

My oldscool method :)

  1. make a spritesheet (an image with N x M frames of animation.. like this explosion spritesheet http://www.unicornmax.com/%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B9%80%E0%B8%81%E0%B8%A1%E0%B8%AA%E0%B9%8C-html5-%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B9%86-part3-%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-e/explosion-sprite-sheet-i0/ )

  2. change frames by change UV coordinates. For example - there I gave my solution http://answers.unity3d.com/questions/780905/have-to-keep-png-files-for-animation-control.html , you could use it for simple cycled animations, or make your own if you need extra animation functionality.

Comment
Add comment · Show 4 · 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 Lynal · Dec 30, 2014 at 03:50 AM 0
Share

hav_ngs_ru, is it possible to make a 2.5D sprited character like in Doom or Duke Nukem with your method ?

avatar image hav_ngs_ru · Dec 30, 2014 at 12:56 PM 0
Share

what do you mean "2.5D sprited character"? does it mean a 2D sprite that walks in 3D world? In this case answer is "yes", you could create a GO with collider, rigidbody or/and other components you wish to interact a 3D world, but without $$anonymous$$eshRenderer, and make a billboard-plane with my (or your own) script, that will be always turn to camera and play given animation, to show 2D sprites.

avatar image Lynal · Dec 30, 2014 at 01:31 PM 0
Share

Actualy, I'm trying to do that with the new 2D Sprite Editor of Unity.

I'm making a Sprite with a lookAt(player) condition, so the Sprite will always face me. Then I insert the sprite in an empy GameObject that I'll use to have a direction.

I change the animation according to the angle and direction of where the player and the character are. A bit tricky.

I guess that's what you're saying :p

avatar image cenker · Jun 06, 2015 at 12:50 PM 0
Share

is it possible in animator own unity3d ? my character doesnt have spritesheet , just have sprite of body part . I tried it but sorting render is not very well

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

25 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

How do I stop sprite animation on last frame? 2 Answers

Most efficient way to do 2D animation 2 Answers

Anima2d: How to use a single sprite for two paws? 0 Answers

SpriteManager 2 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