✅ Get the Project Files unitycodemonkey.com/video.php?v=tJ_ycboPFmY 🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses 👍 Get 3000+ AWESOME Assets at 96% OFF! www.humblebundle.com/software/best-polygon-game-dev-assets-software?partner=codemonkey 🔴 RELATED VIDEOS 🔴 Make Awesome Effects with RenderTextures! (Minimap, In-game TV, Camera to Texture) ruclips.net/video/Ah2862Gz3_s/видео.html Awesome Inventory Tetris System! (Resident Evil 4, Escape from Tarkov) ruclips.net/video/fxaDBE71UHA/видео.html Simple Inventory System in Unity (Store, Use, Stack and Drop Items) ruclips.net/video/2WnAOV7nHW0/видео.html How to Equip Weapons and Items in Unity (Drag Drop, Inventory) ruclips.net/video/isAmoM3RPEI/видео.html Make your Games Designer Friendly! (Scriptable Objects) ruclips.net/video/7jxS8HIny3Q/видео.html
I am beginning to think CM is looking at my search history because I was JUST looking for a good tutorial on 3d item inspection this morning. 😂 Thanks so much Code Monkey! :D
I just found your channel recently and i am baffled, not just because your videos are great but that is so satisfying to me how you arange your code. I mean i can read code and follow a tutorial without problems if the brackets are not there where i would place them, but it is so fucking awesome if you find a tutorial that aranges the code the same way you did. I have no words how great this is and how happy i am with that. Thank you very much!
For anyone using this method, please be aware of Gimbal Lock. When rotating using Eulers instead of Quaternions you run into a situation where two axis can 'collide' and you lose a degree of freedom. This is what happens when I implement the code seen in this video. The reason is a bit long (you can have multiple incorrect axis rotations for the same desired rotation) but because Quaternions use 4 values to determine rotation you don't run into this issue.
An important thing I would like to point out is to remember to unsubscribe from the event, to avoid memory leaks. It could be done in the OnDestroy method.
That's subscribing to an event, so when that event is triggered that function will be called. I covered events in detail here ruclips.net/video/OuZrhykVytg/видео.html
if you wanted to have items that you can also interact with, like opening a box in the resident evil games, could you do it also with the event handlers in the same script (and maybe a ray traced from that camera)? Or it wouldn't be possible because you are using a rendertexture? In that case, would there be a way or would it be better to redo it without a render texture?
The tricky part would be identifying where you are grabbing. You do have more pointer data in that event to check the position which you could use for that logic but it would be tricky. Handling that logic by interacting with the object itself, instead of through a render texture, would be much simpler. Just a raycast on mouse click, separate the box top from the box bottom and see where the player is clicking.
@@CodeMonkeyUnity Maybe a good mix then would be to do like another comment mentioned, and just keep the item cam and model in separated layers so you don't need to hide them in a corner and can just show the mesh itself. I imagine having the rotation working then would need different code? or would those events be available even if just clicking on a model? Thanks for the help!
@@CodeMonkeyUnity After a long time of trying and testing different ways to do this... I wasn't able lol. Any chance that you'd make a second video with an item inspection where you can actually also click on parts of the item to open a case or remove a jewel or whatnot, RE style?
You could check the renderer bounds then do some math depending on the distance of the camera and adjust the fov or move the camera Remember that orthographic size is only used in 2D cameras, not 3D
Never thought of that way on creating this! Is like I said you really are a legend! Btw! I already did your character in-game! And mannn, it looks like you hahah Is there any way I can show you? E-mail/twitter? Thank you once again!
Hi CodeMonkey, I was wondering how I could implement this like Minecraft, which renders blocks as isometric icons, but I have a concern: Too many Cameras is no good for Performance. Is there maybe another way to do this? Thanks, love your videos!
You can lower the resolution of the camera Although how many items are you showing? Ideally you should only inspect 1 or 2 items. Adding the ability to inspect a dozen items at once is going to be quite costly no matter what.
@@CodeMonkeyUnity Thanks for you answer, I was planning on having 16 rendertexture (wich is way too much), I don‘t need to inspect the items, they could also be static but the thing is that I cannot use an image. I just searched for the closest video to my problem.
Yes, but also, we are on a paused game, so when unpausing you can manually call to clean the garbage collector, so your instanced objects will affect nothing on your game.
One suggestion… it seems no one makes tutorial content with gamepads in mind. For me I have no interest in only doing desktop games (because I never play desktop games). Also I can’t find much/any content on navigating UI with gamepads and the new input system.
That’s two suggestions (maybe) for content. Btw, love your work, will have to get your latest course soon. (Even though so haven’t finished the Bolt one yet)👍🏻
Unity has a built-in Navigation menu for the UI, although I haven't used it much. In the only game I did where I supported gamepad UI I built everything myself Something I would like to one day explore would be a virtual cursor, kind of like Destiny
You mean show multiple meshes at once? Sure, instead of deleting the last one instantly you could always keep the last two alive, then make a quick animation moving the previous mesh to the left side, spawning the next one on the right and moving it to the center. Just some basic animation with 2 objects
Hello. I've installed URP and all packages suggested but the class Light2D is still unrecognizable, even by renaming the namespaces :( I'm using Unity 2022.3.22f1 Thanks
What doesn't work in different resolutions? In the demo I just scaled all the preview objects to fit roughly the same size. Alternatively you could get the mesh render bounds and do some math to set the cameras FOV/Distance
@@CodeMonkeyUnity if the resolution of the screen changes, such as doing it in the editor or on a test device, the item doesn't appear in the frame, unless i missed some setting u used to stop that
Mr. Monkey would like to ask that many of your game source packages have a 2D animation system called V_Animation. I don’t know if it is a plug-in or a tool written by you. If it is a tool written by yourself, where can I learn it? It is very important to me. thanks
In addition, may I ask the teacher, have you successfully combined this animation system with Unity's dots system? I feel like this is a huge technological breakthrough
It doesn't work for me in the project I want to use it(use the rotation on drag in that project I mean), in other projects yes but not in this one. Could be that it's because of being a FPS and using the main camera for the "camera look"(using the cursor as main point of the camera). But I tried many things and I haven't been able to fix it. Edit: My bad, I saw now that my EventSystem didn't exist. That's why the object didn't rotate.
If you call Instantiate(); and you pass in a Transform it will return a transform, if you pass in a GameObject it returns a gameObject. ruclips.net/video/B-dVf9wUEbg/видео.html
I just took a screenshot, pasted it in photoshop and cropped the background. If you want to make it automatic you can make some screenshot and file save code unitycodemonkey.com/video.php?v=d5nENoQN4Tw unitycodemonkey.com/video.php?v=dqySkMFieHE
I hope that one day you will create a course to make a simple multilayer card game, somehow I can not find anywhere such a series on yt, which some creators have started are usually abandoned, knowing your skills I'm sure you would be able to create such a course, when it would happen I would love to buy it as well as your other courses. I know that this is a very extensive topic even for such a small project, so I understand why it is so hard to find such courses, but it is a great loss for fans of the genre.
✅ Get the Project Files unitycodemonkey.com/video.php?v=tJ_ycboPFmY
🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses
👍 Get 3000+ AWESOME Assets at 96% OFF! www.humblebundle.com/software/best-polygon-game-dev-assets-software?partner=codemonkey
🔴 RELATED VIDEOS 🔴
Make Awesome Effects with RenderTextures! (Minimap, In-game TV, Camera to Texture) ruclips.net/video/Ah2862Gz3_s/видео.html
Awesome Inventory Tetris System! (Resident Evil 4, Escape from Tarkov) ruclips.net/video/fxaDBE71UHA/видео.html
Simple Inventory System in Unity (Store, Use, Stack and Drop Items) ruclips.net/video/2WnAOV7nHW0/видео.html
How to Equip Weapons and Items in Unity (Drag Drop, Inventory) ruclips.net/video/isAmoM3RPEI/видео.html
Make your Games Designer Friendly! (Scriptable Objects) ruclips.net/video/7jxS8HIny3Q/видео.html
You have no idea how much i needed this i looked other tutorials but they're complicated and don't explain well thank you soo much
I am beginning to think CM is looking at my search history because I was JUST looking for a good tutorial on 3d item inspection this morning. 😂 Thanks so much Code Monkey! :D
I just found your channel recently and i am baffled, not just because your videos are great but that is so satisfying to me how you arange your code. I mean i can read code and follow a tutorial without problems if the brackets are not there where i would place them, but it is so fucking awesome if you find a tutorial that aranges the code the same way you did. I have no words how great this is and how happy i am with that. Thank you very much!
I'm glad you like the videos! Thanks!
For anyone using this method, please be aware of Gimbal Lock.
When rotating using Eulers instead of Quaternions you run into a situation where two axis can 'collide' and you lose a degree of freedom. This is what happens when I implement the code seen in this video.
The reason is a bit long (you can have multiple incorrect axis rotations for the same desired rotation) but because Quaternions use 4 values to determine rotation you don't run into this issue.
An important thing I would like to point out is to remember to unsubscribe from the event, to avoid memory leaks. It could be done in the OnDestroy method.
Omg thank you so much. I didn’t know how to describe this kind of rotation and I couldnt find any material on rotating an object using the mouse.
I'm glad you found this video!
Render Texture is becoming as powerful as the Unity's Particle System. Very cool.
Very nice implementation! Also, don't forget to unsubscribe from events to prevent memory leaks.
I always wanted to know how that actually works thanks
awesome tutorial
LOVE IT! one more step to custom characters!
Very top Code Monkey, your tutorials
help a lot. Congratulations
Useful and fun. Nice job !
Guys, please tell where can i read about syntax that used here 4:20 at line 10. Cause I dont even know what i need to ask in Google)
That's subscribing to an event, so when that event is triggered that function will be called.
I covered events in detail here ruclips.net/video/OuZrhykVytg/видео.html
@@CodeMonkeyUnity Many thanks!
What version of Unity are you using in this video?
if you wanted to have items that you can also interact with, like opening a box in the resident evil games, could you do it also with the event handlers in the same script (and maybe a ray traced from that camera)? Or it wouldn't be possible because you are using a rendertexture? In that case, would there be a way or would it be better to redo it without a render texture?
The tricky part would be identifying where you are grabbing. You do have more pointer data in that event to check the position which you could use for that logic but it would be tricky.
Handling that logic by interacting with the object itself, instead of through a render texture, would be much simpler. Just a raycast on mouse click, separate the box top from the box bottom and see where the player is clicking.
@@CodeMonkeyUnity Maybe a good mix then would be to do like another comment mentioned, and just keep the item cam and model in separated layers so you don't need to hide them in a corner and can just show the mesh itself. I imagine having the rotation working then would need different code? or would those events be available even if just clicking on a model? Thanks for the help!
@@CodeMonkeyUnity After a long time of trying and testing different ways to do this... I wasn't able lol. Any chance that you'd make a second video with an item inspection where you can actually also click on parts of the item to open a case or remove a jewel or whatnot, RE style?
Nice Tutorial, I want to adjust "orthographic.size = any 3d mesh Fit size", can you help me with this please?
You could check the renderer bounds then do some math depending on the distance of the camera and adjust the fov or move the camera
Remember that orthographic size is only used in 2D cameras, not 3D
Never thought of that way on creating this! Is like I said you really are a legend!
Btw! I already did your character in-game! And mannn, it looks like you hahah
Is there any way I can show you? E-mail/twitter?
Thank you once again!
Sure you can post the image on twitter @UnityCodeMonkey
@@CodeMonkeyUnity Thank you! I did it! Once again! Thank You!😃
Hi CodeMonkey, I was wondering how I could implement this like Minecraft, which renders blocks as isometric icons, but I have a concern: Too many Cameras is no good for Performance.
Is there maybe another way to do this?
Thanks, love your videos!
You can lower the resolution of the camera
Although how many items are you showing? Ideally you should only inspect 1 or 2 items. Adding the ability to inspect a dozen items at once is going to be quite costly no matter what.
@@CodeMonkeyUnity Thanks for you answer, I was planning on having 16 rendertexture (wich is way too much), I don‘t need to inspect the items, they could also be static but the thing is that I cannot use an image.
I just searched for the closest video to my problem.
what is line 19 in DummyInventory?
I think instead of destroy the game object .. set active and and deactivate is a a less processing idea
Yes, but also, we are on a paused game, so when unpausing you can manually call to clean the garbage collector, so your instanced objects will affect nothing on your game.
One suggestion… it seems no one makes tutorial content with gamepads in mind. For me I have no interest in only doing desktop games (because I never play desktop games). Also I can’t find much/any content on navigating UI with gamepads and the new input system.
That’s two suggestions (maybe) for content. Btw, love your work, will have to get your latest course soon. (Even though so haven’t finished the Bolt one yet)👍🏻
Unity has a built-in Navigation menu for the UI, although I haven't used it much. In the only game I did where I supported gamepad UI I built everything myself
Something I would like to one day explore would be a virtual cursor, kind of like Destiny
that's a cool mechanic to use in inventory but is there any way to set animation evry time the item change? like small swap or big cyckle effect?
You mean show multiple meshes at once? Sure, instead of deleting the last one instantly you could always keep the last two alive, then make a quick animation moving the previous mesh to the left side, spawning the next one on the right and moving it to the center. Just some basic animation with 2 objects
@@CodeMonkeyUnity thanks
Hello. I've installed URP and all packages suggested but the class Light2D is still unrecognizable, even by renaming the namespaces :( I'm using Unity 2022.3.22f1 Thanks
What using statement do you have? That class exists inside UnityEngine.Rendering.Universal
This doesn't work for different screen resolutions. How do you make sure the item stays center frame for the camera since its in world space?
What doesn't work in different resolutions?
In the demo I just scaled all the preview objects to fit roughly the same size.
Alternatively you could get the mesh render bounds and do some math to set the cameras FOV/Distance
@@CodeMonkeyUnity if the resolution of the screen changes, such as doing it in the editor or on a test device, the item doesn't appear in the frame, unless i missed some setting u used to stop that
How can i handle when the object is so big
Mr. Monkey would like to ask that many of your game source packages have a 2D animation system called V_Animation. I don’t know if it is a plug-in or a tool written by you. If it is a tool written by yourself, where can I learn it? It is very important to me. thanks
It's my custom animation system based on dynamically modifying meshes ruclips.net/video/11c9rWRotJ8/видео.html
@@CodeMonkeyUnity love you love love you
In addition, may I ask the teacher, have you successfully combined this animation system with Unity's dots system? I feel like this is a huge technological breakthrough
It doesn't work for me in the project I want to use it(use the rotation on drag in that project I mean), in other projects yes but not in this one. Could be that it's because of being a FPS and using the main camera for the "camera look"(using the cursor as main point of the camera). But I tried many things and I haven't been able to fix it.
Edit: My bad, I saw now that my EventSystem didn't exist. That's why the object didn't rotate.
One event system is enough ?
How can you Instantiate a GameObject into a Transform?
If you call Instantiate(); and you pass in a Transform it will return a transform, if you pass in a GameObject it returns a gameObject. ruclips.net/video/B-dVf9wUEbg/видео.html
Could someone point in the direction of how to make 3d images in to 2d sprites like on the buttons?
I just took a screenshot, pasted it in photoshop and cropped the background. If you want to make it automatic you can make some screenshot and file save code
unitycodemonkey.com/video.php?v=d5nENoQN4Tw
unitycodemonkey.com/video.php?v=dqySkMFieHE
I hope that one day you will create a course to make a simple multilayer card game, somehow I can not find anywhere such a series on yt, which some creators have started are usually abandoned, knowing your skills I'm sure you would be able to create such a course, when it would happen I would love to buy it as well as your other courses. I know that this is a very extensive topic even for such a small project, so I understand why it is so hard to find such courses, but it is a great loss for fans of the genre.
For multiplayer, I'm still waiting for the official Unity multiplayer to come out of beta.
IDragHandler is not respoding
did u find the solution ?
Neat!
Wait some 2D features
Now do it with HDRP...
active ragdoll unity3d pls
Don't fast forward when you're writing the code. It makes it harder to follow and understand.
You can pause the video or download the project files linked in the description
10/10
It is tecnical issue help me out please !!!
Unity was not crashing sir , build game is not launching , its created for Mobiles , and checking it on mobile and not starting !!