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. 🥲
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!
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 😀
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
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 ?
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
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 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
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.
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
@@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'
Despite adding If(eventsystem.current.ispointerOverGameObject(touchscreen.current.tousches[0].touchid.ReadValue())return; My joystick still moves the camera
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)
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'
I'm here just for the code for looking around. And this tut did helped me. Thanks for the code man!!!
No problem 😊
watching this in 2022 !! it helped me a lot bro thanks
Glad to hear it!
Can you make weapon drop and grab system? Plox?
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
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. 🥲
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...
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
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 😀
Hi bro
Can you make another video about
How to make reaload button
Zoom in/out and gun change buttons?
Hi, You don't need to create apk file to test touch screen rather you can test it from Simulator on editor..
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!
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!
love your explaining style 😶🌫😉😉
Glad to hear that.
Sir you are god literally I learned too much about touch controls thanku 🤩🤩💖
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
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
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 ?
th-cam.com/video/OFXvvuxqPNQ/w-d-xo.html
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
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.
Subscribed! Waiting for more android game tutorial!
I import your files in unity 2022 so face so many error in console 😢😢
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?
You are Boss Man, Thank you.
You're welcome!
Nice Tutorial!
Thanks!
Thank's a lot GDTitans i learned a lot of things
I'm glad to hear that!
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
Iam unable to use TouchScreen can u please help me to how to use that keyword..
up
Plz create video on game objective
the old input system code you give are showing error 9:59
Yes same with me
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.
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
Sir thankyou so much, it help me a lot sir
Assalam alaikum nice video
Walaikum assalam,
Thanks
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
sir what programming are you using?
C#
@@GDTitans thank you
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"
make Third Person Controlle please
make a tutorial about survival game
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
sir in Joystick pack fixed joystick script is missing
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 ❤️
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
Is it free to use, thank
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
Damn that is really helpful for my iOS game
Will it work on rigid body?
NullReferenceException: Object reference not set to an instance of an object
MouseLook.Update () (at Assets/Scripts/Player/MouseLook.cs:39)
Pleas help me
th-cam.com/video/OFXvvuxqPNQ/w-d-xo.html
Starter assets is no longer available
Thanks bro
You are welcome
can someone please give me the crossplatforminput and editor folder without the other useless files
thanks
Where can i put the MouseLook script? I cant undersatnd, where did u put?
Thanks a lot
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
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
i have this error ( } expected ) any one can fix
How to add grandes in this game
th-cam.com/video/BYL6JtUdEY0/w-d-xo.html
Despite adding
If(eventsystem.current.ispointerOverGameObject(touchscreen.current.tousches[0].touchid.ReadValue())return;
My joystick still moves the camera
I have 15 problems with the system input
How to add levels in this game
th-cam.com/video/S5eo5cFk51U/w-d-xo.html
How can shoot and aim on one button
pls help cuz my joystick doesnt work
I want hidden controls
I've talked about that in this video
th-cam.com/video/wdsLDogAALI/w-d-xo.html
@@GDTitans no like a cross play game for mobile & pc
@@GDTitans i need help with my fps game
where the button handler script???
best sir
;>
great
Thanks 😊
th-cam.com/video/NDDXip3ex94/w-d-xo.html
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
th-cam.com/video/wdsLDogAALI/w-d-xo.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 ??
bro thz 😂
Sensacional 👏
E mano samos unicos br aqui aprendendo kkk
Lojitik
Thonks
сложно
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