Posts: 28
Threads: 14
Joined: Mar 2017
Reputation:
0
So I started using unity about a month ago and. I started designing my maps but is it possible via js or c# that I can build an Android game of only my maps and I can just move wherever i want by zooming etc. If yes can u send me the codes pls?
Posts: 872
Threads: 25
Joined: Sep 2014
Reputation:
0
Sure, it's my pleasure. Which part of codes you want me to send you?
Or you can simply tell me the codes that you want me to send you.
Posts: 28
Threads: 14
Joined: Mar 2017
Reputation:
0
I just want a simple c# or JavaScript code that will let me move my camera wherever I want in game idk if it's possible though
Posts: 1,046
Threads: 29
Joined: Mar 2010
Look into Input.GetAxis() and Update() in MonoBehaviour.
You may have to use
Код:
transform.position = transform.position + (((transform.forward * vertical) + (transform.right * horizontal)).normalized * speed * Time.deltaTime);
for horizontal and vertical movement.
For camera rotation look into Quaternion.AngleAxis(), polar and elevation attributes and Quaternion multiplication.