I got another error and this error says "Assets\Scripts\Player\MouseLook.cs(37,62): error CS0104: 'TouchPhase' is an ambiguous reference between 'UnityEngine.InputSystem.TouchPhase' and 'UnityEngine.TouchPhase'
I think there is something wrong with the logic of your MouseLook. What if I operate the left joystick first with the first finger, and then operate the camera rotation with the second finger?
what if we iterate through each touch and store instance || TouchID of touch which is not interacting with UI, or use IPointerDown, Drag and UP event 😅 but its a bit complicated. 🥲
Hi. I'm following your video whose name is "FPS Touch Controls. I followed this video. And i builded and played. But the gun's effect is continuing play and jump button is not working. How can I fix it? Plz help me.
Hi, i have this error when i use the bool isShooting = CrossPlatformInputManager.GetButton("Shoot"); The erros is:InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings. UnityStandardAssets.CrossPlatformInput.PlatformSpecific.StandaloneInput.GetButton
In (EventSystem.current.IsPointerOverGameObject(Touchscreen.current.touches[0].touchId.ReadValue())) Can we have an exception? When I'm on aim mode I still wanna move my screen while keeping the button pressed.
Hi, wonderful video, I have been trying to find solutions for three continuous days, this one is the best so far. But might you know how to be able to select which UI blocks the touch? I have UI's in worldspace and when i swipe across it, the camera control will stop/will not rotate. I have been trying for several hours and still have no working script to modify it. If anyone can help, it will be great!
I have an error : NullReferenceException: Object reference not set to an instance of an object MouseLook.Update () (at Assets/MouseLook.cs:15) How can i solve that ?
Hi, I am having a problem with the controls. When I slide the joystick with my finger too high or too low the player looks in that direction. That shouldn't be happening when I use the joystick. Do you have any idea how can I fix that?
@@GDTitans assalamu alaikum can you plz help because the last thing u did didnt work i am still getting the bug where both joystick and touchfield move
Actually there is an easier way by using the new input system. I am gonna upload a video to demonstrate that. So, make sure to follow my 2d platformer series 😀
Just make the objects have a collider and set it to "Trigger" and then make it so On Trigger Enter, the object gets added to your inventory or spears in your hand, or however your game works, I can't really explain it because every game works differently, then make it so lastly, the object is destroyed
Despite adding If(eventsystem.current.ispointerOverGameObject(touchscreen.current.tousches[0].touchid.ReadValue())return; My joystick still moves the camera
Yes but I don't know how to code, I use the visual scripting so I just use the math units and I divide the number before it's connected to "Set Position"
Hi, thanks for this nice tutorial, I am using the old input system and uses joystick controls and implemented codes given in the video, when I build my game on android uses a joystick for moving the screen will movies because it counts the touches on the joystick as well, how can I use this joystick only for moving the character and not for moving the camera. I am using the MouseLook script.
@@fachri17 Thanks but I got another error and this error says "Assets\Scripts\Player\MouseLook.cs(37,62): error CS0104: 'TouchPhase' is an ambiguous reference between 'UnityEngine.InputSystem.TouchPhase' and 'UnityEngine.TouchPhase'
NullReferenceException: Object reference not set to an instance of an object MouseLook.Update () (at Assets/Scripts/Player/MouseLook.cs:39) Pleas help me
could you please teach us how to make tournaments in unity in which you could face random rivals and if you qualified you face the other qualified rivals till reaching the final and the you are the champion
hey please make fast video because i want to publish my game on play store.., (how to proper build a game for play store ??).., please given details for update password, key, intro, google ads bundle ??
Hello! I get these error messages: I press the jump button but I immediately receive these sentences: InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings. UnityStandardAssets.CrossPlatformInput.PlatformSpecific.StandaloneInput.GetButtonDown (System.String name) (at Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs:22) UnityStandardAssets.CrossPlatformInput.CrossPlatformInputManager.GetButtonDown (System.String name) (at Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs:121) PlayerMovement.Update () (at Assets/Scripts/PlayerMovement.cs:66)
I'm here just for the code for looking around. And this tut did helped me. Thanks for the code man!!!
No problem 😊
If you're getting error in old input system
Try:
Replace "=" with "==" in if statement.
tnks'
Yo thanks man 😂❤️
i actually surfered for 1 hour thanks bro so much
thankssss a lot hahaha that was helorious that i missed the detail
I got another error and this error says "Assets\Scripts\Player\MouseLook.cs(37,62): error CS0104: 'TouchPhase' is an ambiguous reference between 'UnityEngine.InputSystem.TouchPhase' and 'UnityEngine.TouchPhase'
watching this in 2022 !! it helped me a lot bro thanks
Glad to hear it!
It didn't help me at all, but it did guide me, good video.
I will upload another video that explains an easier way using the new input system 😀
Can you make weapon drop and grab system? Plox?
I think there is something wrong with the logic of your MouseLook. What if I operate the left joystick first with the first finger, and then operate the camera rotation with the second finger?
what if we iterate through each touch and store instance || TouchID of touch which is not interacting with UI,
or use IPointerDown, Drag and UP event 😅 but its a bit complicated. 🥲
Hi, You don't need to create apk file to test touch screen rather you can test it from Simulator on editor..
Sir you are god literally I learned too much about touch controls thanku 🤩🤩💖
love your explaining style 😶🌫😉😉
Glad to hear that.
You are Boss Man, Thank you.
You're welcome!
Hi. I'm following your video whose name is "FPS Touch Controls. I followed this video. And i builded and played. But the gun's effect is continuing play and jump button is not working. How can I fix it? Plz help me.
Hi, i have this error when i use the bool isShooting = CrossPlatformInputManager.GetButton("Shoot");
The erros is:InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
UnityStandardAssets.CrossPlatformInput.PlatformSpecific.StandaloneInput.GetButton
In (EventSystem.current.IsPointerOverGameObject(Touchscreen.current.touches[0].touchId.ReadValue()))
Can we have an exception? When I'm on aim mode I still wanna move my screen while keeping the button pressed.
@GDTitans can u help me
Subscribed! Waiting for more android game tutorial!
sir can you teach us how to add footstaps sound effect and jump sound to player. thank you for this amazing series
I think you could do that with another tutorial and jsut like apply it
Thank's a lot GDTitans i learned a lot of things
I'm glad to hear that!
Hi, wonderful video, I have been trying to find solutions for three continuous days, this one is the best so far. But might you know how to be able to select which UI blocks the touch? I have UI's in worldspace and when i swipe across it, the camera control will stop/will not rotate. I have been trying for several hours and still have no working script to modify it. If anyone can help, it will be great!
When I touch the joystick to move screen back and forth it also causes the camera to rotate. Why?
Watch the whole video lol
@@mdsami4490 The video didn`t solve this problem dude
Next tutorials on more hyper causal games like voodoo games for beginners...
Nice Tutorial!
Thanks!
Hey bro, amazing vid! Though, I have an error. It says: "The name 'Touchscreen' does not exist in the current context". How do i fix that?
Thanks for your comment
Make sure to install the new input system package and restart unity
And include the package
using UnityEngine.InputSystem
@@GDTitans I figured it out myself, I was using the old input system! Btw your code for the old input has an error! It's actually 2 ==!
That means the object with that name is not found, the object has a different name
@@DARK_AMBIGUOUS thanks for the reply, but I already solved my problem!
I have an error : NullReferenceException: Object reference not set to an instance of an object
MouseLook.Update () (at Assets/MouseLook.cs:15)
How can i solve that ?
ua-cam.com/video/OFXvvuxqPNQ/v-deo.html
Assalam alaikum nice video
Walaikum assalam,
Thanks
Hi, I am having a problem with the controls. When I slide the joystick with my finger too high or too low the player looks in that direction. That shouldn't be happening when I use the joystick. Do you have any idea how can I fix that?
Did you figure it out yet?
Sir thankyou so much, it help me a lot sir
Hi bro
Can you make another video about
How to make reaload button
Zoom in/out and gun change buttons?
thank you for making these videos
No problem 😊
@@GDTitans assalamu alaikum can you plz help because the last thing u did didnt work i am still getting the bug where both joystick and touchfield move
Will it work on rigid body?
i just want to know where did u put MouseLock file in canvas ? that connected with Image? or with camera?
i wanna know that too, do you know where ?
me too
hey, this would have helped but can you please put the first person movement script? along with the mouse look
Check out the project on my github account github.com/Chaker-Gamra/FPS-Game-Unity
Can I ask you to subtitle?
Because I can't use auto translation, and I want to read subtitles.
the old input system code you give are showing error 9:59
Yes same with me
sir what programming are you using?
C#
@@GDTitans thank you
Damn that is really helpful for my iOS game
Iam unable to use TouchScreen can u please help me to how to use that keyword..
up
Het plzz make a all button event trigger plz I can't understand to set like scope button , help us
Actually there is an easier way by using the new input system.
I am gonna upload a video to demonstrate that.
So, make sure to follow my 2d platformer series 😀
@@GDTitans ok thnx bro
sir in Joystick pack fixed joystick script is missing
Is it free to use, thank
Starter assets is no longer available
Please make a tutorial on weapon and ammo pickup and drop system
Just make the objects have a collider and set it to "Trigger" and then make it so On Trigger Enter, the object gets added to your inventory or spears in your hand, or however your game works, I can't really explain it because every game works differently, then make it so lastly, the object is destroyed
It's not working if i press joystick after that if i tried to move player then it's not working? Can you tell some fix
Check out the script on Github github.com/Chaker-Gamra/FPS-Game-Unity
@@GDTitans thnx ❤️
Thanks bro
You are welcome
Really helpful, thanks for the tutorial.what about the sniper scope button.if possible teach us.
It's easy try to use what you know to implement it.
Okay I will try thank you.
It's 100% possible, just make a button that plays an animation of the camera zooming in, then make one of it zooming out
Plz create video on game objective
I import your files in unity 2022 so face so many error in console 😢😢
Thanks a lot
Despite adding
If(eventsystem.current.ispointerOverGameObject(touchscreen.current.tousches[0].touchid.ReadValue())return;
My joystick still moves the camera
i have this error ( } expected ) any one can fix
make Third Person Controlle please
hi, i have an error on cs:22 "object reference not set to an instance of an object" (11:08)
please tell me, did you solve this problem?
if yes, please tell me how to fix it
@@lolip_p i don't remember. better use another tutorial
can someone please give me the crossplatforminput and editor folder without the other useless files
thanks
Does anybody know how to decrease the touch sensitivity @GDTitans
Yes but I don't know how to code, I use the visual scripting so I just use the math units and I divide the number before it's connected to "Set Position"
I'm facing one problem it work awesome but when joystick is pressed then I can't rotate my player?
github.com/Chaker-Gamra/FPS-Game-Unity/blob/master/Assets/Scripts/Player/MouseLook.cs
@@GDTitans Thanks ❤️
Bro did you fix it?
I have the same probem
Hi, thanks for this nice tutorial, I am using the old input system and uses joystick controls and implemented codes given in the video, when I build my game on android uses a joystick for moving the screen will movies because it counts the touches on the joystick as well, how can I use this joystick only for moving the character and not for moving the camera. I am using the MouseLook script.
Hello, has this issue been resolved
make a tutorial about survival game
Where can i put the MouseLook script? I cant undersatnd, where did u put?
How can shoot and aim on one button
pls help cuz my joystick doesnt work
hello sir i have error that on old input it says you cannot use "&&" between bool and float type
please help me
Use == instead of = sir
@@fachri17 Thanks but I got another error and this error says "Assets\Scripts\Player\MouseLook.cs(37,62): error CS0104: 'TouchPhase' is an ambiguous reference between 'UnityEngine.InputSystem.TouchPhase' and 'UnityEngine.TouchPhase'
@@fachri17 tysm, I fixed it
NullReferenceException: Object reference not set to an instance of an object
MouseLook.Update () (at Assets/Scripts/Player/MouseLook.cs:39)
Pleas help me
ua-cam.com/video/OFXvvuxqPNQ/v-deo.html
How to add grandes in this game
ua-cam.com/video/BYL6JtUdEY0/v-deo.html
great
Thanks 😊
ua-cam.com/video/NDDXip3ex94/v-deo.html
I have 15 problems with the system input
where the button handler script???
best sir
;>
How to add levels in this game
ua-cam.com/video/S5eo5cFk51U/v-deo.html
could you please teach us how to make tournaments in unity in which you could face random rivals and if you qualified you face the other qualified rivals till reaching the final and the you are the champion
I guess you would use Mirror Networking or one of the other multiplayer things
Sensacional 👏
E mano samos unicos br aqui aprendendo kkk
I want hidden controls
I've talked about that in this video
ua-cam.com/video/wdsLDogAALI/v-deo.html
@@GDTitans no like a cross play game for mobile & pc
@@GDTitans i need help with my fps game
Gradle build failed
How to solve
For the first time, it needs internet access
@@GDTitans yes and after
whay dont work
This is the new way that works with the new input system
ua-cam.com/video/wdsLDogAALI/v-deo.html
can anyone help? :)
Hey what's up
hey please make fast video because
i want to publish my game on play store..,
(how to proper build a game for play store ??)..,
please given details for update password, key, intro, google ads bundle ??
Thonks
bro thz 😂
Lojitik
сложно
Hello! I get these error messages: I press the jump button but I immediately receive these sentences:
InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
UnityStandardAssets.CrossPlatformInput.PlatformSpecific.StandaloneInput.GetButtonDown (System.String name) (at Assets/Standard Assets/CrossPlatformInput/Scripts/PlatformSpecific/StandaloneInput.cs:22)
UnityStandardAssets.CrossPlatformInput.CrossPlatformInputManager.GetButtonDown (System.String name) (at Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs:121)
PlayerMovement.Update () (at Assets/Scripts/PlayerMovement.cs:66)
u are using old input system