Awesome explanation, i could find the answer in a stack overflow post but i couldn't figure out how the code worked, thanks to you my character can now check the mouse position and teleport to it. Ty
This was super clear and you went through both the infinite invisible plane, which I found a lot searching for this, and the position on a game object, which was the one I needed. And now I even understand the use case for both. Thank you!
Hey, thank you for your tutorial, it was really useful and I love the way you explain every detail along with the logic behind it. It's super useful while lots of tutorials tend to skip little details. Thanks you
Great how to. Explained nicely and to the point. And I also finaly understand, how Layer Masks are represented by int, even though I was looking for something different:)
Great video, I'm teaching myself Unity with only basic C++ under my belt before this, finding your explanations amazing to help me think out what I can do with the tools Unity gives which some tutorials don't seem to give. Thanks man and God bless
I'm guessing you mean the part on getting a point against a collider? the sphere's centre is at the point of impact, on the collider's surface, but, if you want it to appear as if it's touching, but not intersecting, you could probably find a point that's half a sphere back along the ray's path and move it there. There may be an easier way, probably using the ray, but, off the top of my head, something like get the direction from the point of impact towards the mouse world point as a unit vector, then multiply that the radius of the sphere, might work.
Been trying to use Raycast to move an isometric camera by clicking and dragging. So far I managed to move the camera but for some reason it flickers and i've tried lots of ways to avoid this (for example using LateUpdate) but cant get it to work for some reason. And if I dont use Raycast and just use ScreenToWorldPoint, the camera moves faster horizontally and slower when swiping vertically. Im losing my mind with this one
You may have already done this but first thing to check should probably be if this happens in a built version. A lot of Unity's choppy visuals are gone when you build a standalone build.
@@GameDevBeginner thanks! I did not try this. But i will check it out. I "solved it" by just straight copying game dev guide's camera controller for a strategy game scripts. Lerping kinda hides the problem. But i know it's still there.
For anyone looking to use these methods with the new input system (because I agree, it is better) you'll need to use a slightly different method for getting the mouse position: gamedevbeginner.com/input-in-unity-made-easy-complete-guide-to-the-new-system/#input_system_get_mouse_position
I'm so impressed with your teaching style. You're such an asset to this community.
You're the first one that has explained the depth concept with such a great way. Amazing video!
Plane Raycast, what an amazing approach, no need to use game objects with colliders, great job!!
I love Plane Raycast!
17:32 I was desperately looking for a solution like this one, thank you so much!
You're welcome!
Awesome explanation, i could find the answer in a stack overflow post but i couldn't figure out how the code worked, thanks to you my character can now check the mouse position and teleport to it. Ty
This was super clear and you went through both the infinite invisible plane, which I found a lot searching for this, and the position on a game object, which was the one I needed. And now I even understand the use case for both. Thank you!
I only watched to the 4 minute point because I'm making a 2d game, but from what I saw this was a very helpful video. Thank you!
Hey, thank you for your tutorial, it was really useful and I love the way you explain every detail along with the logic behind it. It's super useful while lots of tutorials tend to skip little details. Thanks you
Thank you, great to hear it helped!
Great how to. Explained nicely and to the point. And I also finaly understand, how Layer Masks are represented by int, even though I was looking for something different:)
Thank you, this was helpful, i also found the bit about layermask values with binary interesting
Thank you!
Such a great tutorial. Thanks man.
Great video, I'm teaching myself Unity with only basic C++ under my belt before this, finding your explanations amazing to help me think out what I can do with the tools Unity gives which some tutorials don't seem to give. Thanks man and God bless
Great explanation and plane raycast is so helpful. Thanks!
I LOVE Plane Raycast!
Great video! I love that you describe why things are happening, make learning much easier. 😊😊👍👍
Amazing video, really the best videos out there
Wow, plane raycast is a real life-saver. I hated setting up tags for every single floor tile in my game!
I LOVE plane raycast!
Great video, you are very good explaining things, i will check your next videos for sure!!!
Brilliant tutorial. Thank you!
You're welcome!
This was helpful. Thanks.
This video was helpful thank you. Could you please share your setup details.
Which method performs better?
Following your tutorial. Any idea why the sphere is half inside the cube half outside it?
I'm guessing you mean the part on getting a point against a collider? the sphere's centre is at the point of impact, on the collider's surface, but, if you want it to appear as if it's touching, but not intersecting, you could probably find a point that's half a sphere back along the ray's path and move it there. There may be an easier way, probably using the ray, but, off the top of my head, something like get the direction from the point of impact towards the mouse world point as a unit vector, then multiply that the radius of the sphere, might work.
Awesome) Thank you, hello from Ukraine)
You're welcome!
If I want to use the plane Raycast method but on a vertical plane, do I just change the up/down to left/right?`😅
Absolutely!
Been trying to use Raycast to move an isometric camera by clicking and dragging. So far I managed to move the camera but for some reason it flickers and i've tried lots of ways to avoid this (for example using LateUpdate) but cant get it to work for some reason.
And if I dont use Raycast and just use ScreenToWorldPoint, the camera moves faster horizontally and slower when swiping vertically. Im losing my mind with this one
You may have already done this but first thing to check should probably be if this happens in a built version. A lot of Unity's choppy visuals are gone when you build a standalone build.
@@GameDevBeginner thanks! I did not try this. But i will check it out. I "solved it" by just straight copying game dev guide's camera controller for a strategy game scripts. Lerping kinda hides the problem. But i know it's still there.
awosame ! You are the best
Thank you so much 💖
Thank you!
Thanks!
Thank you
Nice vid!!🔥🔥🔥🍻
Thx a lot
18 min to learn mouse position to world position ?
TL DR: Vector3 worldPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition); if that helps!
@@GameDevBeginner thanks for the answer
Why does everyone teach the old Input system? The new one is superior...
For anyone looking to use these methods with the new input system (because I agree, it is better) you'll need to use a slightly different method for getting the mouse position: gamedevbeginner.com/input-in-unity-made-easy-complete-guide-to-the-new-system/#input_system_get_mouse_position
Thank you !
thanks so much