Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 raiwin · Jun 25, 2016 at 05:53 AM · animationtexture3dmaterialspritesheet

Sprite animation from 2D to 3D

Hi, I'm fairly new to Unity.

We started a 2D project which is getting transfered to a 3D project to have the look of a 2.5D game (à la Don't Starve).

In the 2D project we used a sprite sheet for animating sprites, but now that we're moving to a 3D project and we're no longer able to use sprites, I would like to know what is the best way to achieve the same result of having an animated sprite object through a sprite sheet but for a 3D object?

For example, we had a machine that was made out of different parts/sprites, some parts/sprites were animated through 'position animation' and other parts were animated through 'sprite animation'. What would be the best way to translate this into a 3D project?

Thanks.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by jdean300 · Jun 25, 2016 at 06:23 AM

Why can't you use the sprites? The ability to have objects overlap can be controlled by it's distance from the camera, which I am sure is the way Dont Starve does it. Set your main camera to orthographic, move your objects around in 3d space as you normally would, and "Billboard" all of the sprites. To billboard your objects, just attach this script to them:

 public class Billboard : MonoBehaviour
 {
     private void LateUpdate ()
     {
         if (Camera.main != null)
         {
             transform.LookAt (Camera.main.transform.position, Vector3.up);
             transform.Rotate (Vector3.up, 180);
         }
     }
 }

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 raiwin · Jun 25, 2016 at 08:55 AM 0
Share

Thanks, I had the impression I wouldn't be able to use sprites in a 3D project!

avatar image
0

Answer by tanoshimi · Jun 25, 2016 at 07:22 AM

All games made with Unity are "3D". The choice of 3D/2D when you start a new project just makes minor changes as to default behaviour whether image files are imported as textures or sprites, and whether the camera is orthographic or perspective, but all the features of the engine work exactly the same. Sprites are just images drawn onto 2d polygons aligned to face the camera. So keep your sprite animation exactly as it was

For example, in the following screenshot, the probe and the character are 2D sprites that move on a flat plane with Z=0. The rocks in the background are also 2D sprites at various depths in the distance. Between them is a 3D terrain mesh. The sprites are animated using traditional sprite sheet methods (there's a video of them in action at http://nome-game.com/2016/06/24/enter-sandman/)

alt text


2d3d2.jpg (113.4 kB)
Comment
Add comment · Show 2 · 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 raiwin · Jun 25, 2016 at 08:57 AM 0
Share

Thanks for the info!

avatar image sid4 · Oct 07, 2016 at 11:38 AM 0
Share

yes that's rights this answer is correct

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Imported model textures are solid colour 0 Answers

Spin a texture in just any material -is it possible? 1 Answer

Gameobject Texture Distortion -1 Answers

How to add texture to Blender objects properly? 2 Answers

2D eyes on 3D character? 2 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