SA-MP Forums Archive
Need help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Need help (/showthread.php?tid=635501)



Need help - Advait - 08.06.2017

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?


Re: Need help - X337 - 08.06.2017

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.


Re: Need help - Advait - 09.06.2017

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


Re: Need help - BigETI - 09.06.2017

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.


Re: Need help - Advait - 09.06.2017

Quote:
Originally Posted by BigETI
Посмотреть сообщение
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.
Thanks a lot ill do the first part but I didn't understood the second part like the part about Quaternion.AngleAxis(), polar and elevation attributes and Quaternion multiplication. If anyone else knows it will be really great