I'm glad I could be of help. me myself have been stuck on this same problem for months and after a lot of searching and looking at people smarter then me on ton of forums I found a way to finally achieve a good result.
The issue might be that the controls are pretty sensitive, meaning that you have to make sure that the phone is perfectly in one place for your character to stand still, basically way the rotation works is depending on way your phone is facing it will choose that direction as the original rotation, so if you place your phone let's say on your table it should just look in one direction and don't slide since no tilting is being done by you with the phone. I hope this helped you in any way and thank you for the comment
@@lurple_ thanks! I'm thinking I'll just put a minimum force value that's greater than the sliding speed so that it only moves when I move faster than that. Maybe that will stop it
@@ianfield17 good idea I like a game developer that thinks of he's own unique solution to a problem cause I relate whenever I come across a bug I always choose the most barbaric solution but it still feels good to solve a problem you've been stuck on for a while, anyways I wish you the best of luck on your game dev journey and I hope my tutorial was more helpful than confusing :)
Nah no need to thank me man I'm really happy I could help actually the whole reason why I made the tutorial is since I was stuck on I'm pretty sure similar issue as you so yeah I'm really happy I could have someone that's stuck on same thing I was struggling with not that long ago and thank you again really comments like yours really motivate me in so many ways thank you man
This is an interesting tutorial, but unfortunately I've been having problems compiling the Android executable using any LTS version of Unity, something to do with Grandel or Java errors. The gyroscope code is still useful.
Hey thanks for the comment, the game style is achieved through a shader which takes in a color palette, I actually have a video about achieving this exact style right here: ua-cam.com/video/l_riMKs_uZw/v-deo.htmlsi=lwiHCrWPa9xfhzFx The video is silent and not very good I apologize for that but it showcases fully how to achieve this type of look, I hope it helps you achieve this look
Help. I read that Input.acceleration only uses accelerometer but if i disable gyro, Inut.acceleration wont work so they might work together depending on the device or something like that?
As long as the device you're using to test ur game has access to both or at least one of those accessibilities that specific one will work and the other one of course won't same scenario takes place if you disable one of them only the other will work I don't think disabling one of them interferes with the other's performance I hope this could be of help :)
I haven't really ventured into developing a controller game but if I'm correct the same code might work with a controller same as it does when paired with a phone.
Make sure you add a character controller and also make sure that the player controller script is word for word correct if not even the slightest mistakes can break it. You can find the full code here: paste.myst.rs/j7rol335 ;)
Do u have any Idea how i could do a similar game but with WebGL? Because I want to run the game on a PC and use the Smartphones Gyro just as a joystick. We already get the gyro Data from our website into Unity but we oviously can´t use Input.gyro.Enabled bacause it is not an android build.
This is really interesting problem/idea you've proposed I haven't really got into WebGL but I did have a similar idea a long time ago it went something like this: it was an idea for a mobile game like 5 people would download the game and open it and then one person would host a game and the other 4 would join just like a normal online game but what's different here is whoever hosts the game works as the game screen and everyone who joined their mobile devices only have one purpose and that is to be used as a controller so yeah I'm sorry I couldn't really help but I would happily help you with the project if you would like that feel free to give me your discord name and the 4 letter digit code thanks :)
That was actually my first intend when I was writing the code to move the player according to the phones precise rotation and the force that is used on the phone in real life aka detecting my actual movements in person while holding the phone but I couldn't get this system to work that's why I use an accelerometer for the phone it seemed like a good replacement for what I wanted to achieve but while I was doing my research I came across few ways of doing what you want achieve to put you on the right track I recommend using GPS coordinates to move the player this will helps you if you're using a broader playing field like if you want to detect somewhat precise movements of the phone over a long distance like pokemon go for example
@@lurple_ thanks sir but I dont plan to use GPS, do you have any other idea on how to move the camera when actual moving. like putting a script in a camera and make it work
@@tompontejos6554 there is a plugin for unity that does the exact thing you want to achieve I'm pretty sure it's open source I found it later on in my development if I had founded the plugin sooner I might have not written this script I'll try to look for the plugin I'm not sure exactly what it was called but when I find it I'll make sure to let you know
@@lurple_ hello, did you find that plugin?? My team is working on real-time motion tracking of the user so it would be helpful for us if u share some info. Thank you in advance 😊
@@dssanjaya979 I'm sorry to say I couldn't track it down I remember that it was a plugin developed by Microsoft I randomly came up on it one day but I couldn't find it again I hope you can find it and thanks for the comment I'm happy if my tutorial could help in any way :)
Thank you!!
You're welcome :)
The best tutorial of this topic. Congratulations, and thanks! Like and suscribed
I'm glad I could be of help. me myself have been stuck on this same problem for months and after a lot of searching and looking at people smarter then me on ton of forums I found a way to finally achieve a good result.
Epic
0o0
Does anyone have the issue of the player sliding for no apparent reason when holding your phone still?
The issue might be that the controls are pretty sensitive, meaning that you have to make sure that the phone is perfectly in one place for your character to stand still, basically way the rotation works is depending on way your phone is facing it will choose that direction as the original rotation, so if you place your phone let's say on your table it should just look in one direction and don't slide since no tilting is being done by you with the phone. I hope this helped you in any way and thank you for the comment
@@lurple_ thanks! I'm thinking I'll just put a minimum force value that's greater than the sliding speed so that it only moves when I move faster than that. Maybe that will stop it
@@ianfield17 good idea I like a game developer that thinks of he's own unique solution to a problem cause I relate whenever I come across a bug I always choose the most barbaric solution but it still feels good to solve a problem you've been stuck on for a while, anyways I wish you the best of luck on your game dev journey and I hope my tutorial was more helpful than confusing :)
@@lurple_ thanks a lot! I appreciate it.
Bruh, you`re soooo underrated!!! Subscribed instantly!!!!
Aww I'm glad I could help this means a lot to me thanks for the sub I hope I can help more in the future :)
@@lurple_ you just save my gamedev attempt rn. I was stuck in the quaternion and you helped me a lot!! Thanks again bro 💪💪💪
Nah no need to thank me man I'm really happy I could help actually the whole reason why I made the tutorial is since I was stuck on I'm pretty sure similar issue as you so yeah I'm really happy I could have someone that's stuck on same thing I was struggling with not that long ago and thank you again really comments like yours really motivate me in so many ways thank you man
Perfect! Exactly what I was after - thank you
You're very welcome my good sir
This is best tutorial.. You are prof. You are best
Glad I could help :)
Here is the Script without the accelerometer - paste.myst.rs/j7rol335 if you want the accelerometer just uncomment the code under movement in Update.
Thanks for that I'm sure it will save some time for the viewers :)
Cool work!!!
Thanks captain.
This is an interesting tutorial, but unfortunately I've been having problems compiling the Android executable using any LTS version of Unity, something to do with Grandel or Java errors. The gyroscope code is still useful.
I'm happy as long as I can help in any way I would recommend using officially supported versions of unity
Hi can i ask did you make the graphics of the game i want that game style too
Hey thanks for the comment, the game style is achieved through a shader which takes in a color palette, I actually have a video about achieving this exact style right here: ua-cam.com/video/l_riMKs_uZw/v-deo.htmlsi=lwiHCrWPa9xfhzFx
The video is silent and not very good I apologize for that but it showcases fully how to achieve this type of look, I hope it helps you achieve this look
@@lurple_ thank you so muchhhh
@@lurple_ does it work to version 2023?
@@noizu6022 yes I'm pretty certain it does, in the video I'm showcasing it on a 2020 version though.
Help. I read that Input.acceleration only uses accelerometer but if i disable gyro, Inut.acceleration wont work so they might work together depending on the device or something like that?
As long as the device you're using to test ur game has access to both or at least one of those accessibilities that specific one will work and the other one of course won't same scenario takes place if you disable one of them only the other will work I don't think disabling one of them interferes with the other's performance I hope this could be of help :)
How to receive accelerometer and gyroscope data from gamepad?
I haven't really ventured into developing a controller game but if I'm correct the same code might work with a controller same as it does when paired with a phone.
@Lurple I followed all steps of tutorial, but gameObject is not rotating. What did I messed up?
Make sure you add a character controller and also make sure that the player controller script is word for word correct if not even the slightest mistakes can break it.
You can find the full code here: paste.myst.rs/j7rol335 ;)
thanks!!!!!
No problem
Do u have any Idea how i could do a similar game but with WebGL? Because I want to run the game on a PC and use the Smartphones Gyro just as a joystick. We already get the gyro Data from our website into Unity but we oviously can´t use Input.gyro.Enabled bacause it is not an android build.
This is really interesting problem/idea you've proposed I haven't really got into WebGL but I did have a similar idea a long time ago it went something like this: it was an idea for a mobile game like 5 people would download the game and open it and then one person would host a game and the other 4 would join just like a normal online game but what's different here is whoever hosts the game works as the game screen and everyone who joined their mobile devices only have one purpose and that is to be used as a controller so yeah I'm sorry I couldn't really help but I would happily help you with the project if you would like that feel free to give me your discord name and the 4 letter digit code thanks :)
@@lurple_ I would be totaly down for that, my Name is Leflob and code is 7683
thanks in advance :)
wow this is great
Thank you this means a lot :)
how to stop the auto movement and change the movement depends on when the camera is moving forward or backward (actual movement of user using phone )
That was actually my first intend when I was writing the code to move the player according to the phones precise rotation and the force that is used on the phone in real life aka detecting my actual movements in person while holding the phone but I couldn't get this system to work that's why I use an accelerometer for the phone it seemed like a good replacement for what I wanted to achieve but while I was doing my research I came across few ways of doing what you want achieve to put you on the right track I recommend using GPS coordinates to move the player this will helps you if you're using a broader playing field like if you want to detect somewhat precise movements of the phone over a long distance like pokemon go for example
@@lurple_ thanks sir but I dont plan to use GPS, do you have any other idea on how to move the camera when actual moving. like putting a script in a camera and make it work
@@tompontejos6554 there is a plugin for unity that does the exact thing you want to achieve I'm pretty sure it's open source I found it later on in my development if I had founded the plugin sooner I might have not written this script I'll try to look for the plugin I'm not sure exactly what it was called but when I find it I'll make sure to let you know
@@lurple_ hello, did you find that plugin?? My team is working on real-time motion tracking of the user so it would be helpful for us if u share some info. Thank you in advance 😊
@@dssanjaya979 I'm sorry to say I couldn't track it down I remember that it was a plugin developed by Microsoft I randomly came up on it one day but I couldn't find it again I hope you can find it and thanks for the comment I'm happy if my tutorial could help in any way :)
I think you hide your email so i gave u my DC credentials as an answer to ur comment, feel free to reach out any time ;)