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 Porto881 · Jul 17, 2013 at 01:47 PM · cameracontroller

Animal Crossing type game

I have been using unity for a couple of weeks now and i pretty much understand the basics of it. Right now I´m playing Animal Crossing New Leaf for the Nintendo 3DS and i was thinking it might be a good idea to sort of use some of the things from that game in a project to learn how it can be done in Unity and so on.

Now to my question: What kind of controller-setup is the best for this type of game? I want it to look like the older Animal Crossing game which look like this: http://www.youtube.com/watch?v=ocf6_xRjBqU

I have created a scene and set up a camera that replicate what im after pretty good but I dont really know what kind of controller setup to use? None of the two unity-controllers work because the 3rd-person controller mess up my camera setup and the fps-controller just dont seem right for this type of game.

Lets say i have a model that i want to move around like in the game in the video, how do I accomplish that?

Comment
Add comment · Show 3
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 PAEvenson · Jul 17, 2013 at 02:26 PM 0
Share

from my memory of animal crossing...it was always a fixed camera position looking at the player. Something like this?

 public class AnimalCrossingCamera : $$anonymous$$onoBehaviour {
     
     public Transform target;
     public Vector3 cameraDistance = new Vector3(0f,1f,1f);
     // Use this for initialization
     void Start () {
     
     }
     
     // Update is called once per frame
     void Update () {
         transform.LookAt(target);
         transform.position = target.position + cameraDistance;
     }
 }


You will have to add your own controller for movement, but this should mimic the animal crossing camera.

avatar image Porto881 · Jul 17, 2013 at 03:39 PM 0
Share

I have the camera as a child of the player-object so it follows it around like i want it to. The problem I have now is how to make the playerobject-controller to work. I want it to move like in the video where the player is facing the direction of the button pressed.

So if i press the down arrow the player will face the camera and if i press the up arrow he will look away from the camera.

Im very new to c# so I have no idea how to accomplish this but it doesnt seem to be a very hard thing to accomplish?

avatar image Porto881 · Jul 18, 2013 at 11:37 AM 0
Share

It works now, thank you very much!

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by PAEvenson · Jul 17, 2013 at 04:22 PM

Yea it will be difficult for you to accomplish that with the camera a child of the player, it should be independent. Otherwise, the camera will be turning with your player. Here try this....

  1. Bring in the 3rd person controller

  2. Remove the 3rd person camera script from the "3rd person controller" gameobject.

  3. Add my script to the main camera(Do not make child of "3rd person controller" gameobject)

  4. set the camera script's target to the "3rd person controller" gameobject.

  5. Add a plane to walk on and you should be good to go.

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

16 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

Related Questions

Camera stutters a lot when looking around (need help) 2 Answers

Issue with my camera controls 0 Answers

setting a character controller orientation by script 1 Answer

Camera Controller Script for 2.5D SideScroller Error 0 Answers

3rd person camera/movement 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