- Home /
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?
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.
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?
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....
Bring in the 3rd person controller
Remove the 3rd person camera script from the "3rd person controller" gameobject.
Add my script to the main camera(Do not make child of "3rd person controller" gameobject)
set the camera script's target to the "3rd person controller" gameobject.
Add a plane to walk on and you should be good to go.
Your answer
![](https://koobas.hobune.stream/wayback/20220613110301im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
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