Hi everyone! You can help me by sharing this video if you like it) Thank you for watching!
@monstereugene2 жыл бұрын
good news this vid is about to blow up because of beginners like me thank gmtk
@daddymccarthy2 жыл бұрын
GMTK 2022 brought me here
@SouthHill_2 жыл бұрын
Good luck, mate!
@lukedeets50162 жыл бұрын
Haha! I’ve been trying to get this die to give me it’s value for the past 4 hours!
@kaotic-chip46172 жыл бұрын
@@lukedeets5016 me to have you managed to fix it
@SpiritowlTV6 жыл бұрын
you can also do this by sending raycasts outwards of the faces and getting the dot product of the direction of them and vector.up. giving you the result.
@Pur_Cell3 жыл бұрын
I was thinking loop through all the side checker objects and see which one was highest
@SpiritowlTV3 жыл бұрын
You know that is actually a great idea. Wish I did it that way.
@artisrozentals58535 ай бұрын
Thank You! Your helped me more then Copilot. His solution was a lot more complicated involving vector dot products etc. And still giving me not 100% accurate results. It was funny that dice rolled 5, but script said it is sometimes something else. 😀
@willichillmann94634 жыл бұрын
Thank you very much, worked very well! In the end, I had to adjust the diceCheckZone as I placed it too high so that the wrong numbers were displayed - just in case someone faces similar problems. Great tutorial, thank you so much! Scripts also worked very well.
@mkfive1000 Жыл бұрын
Thank you. This video was very helpful to me.
@kunalsingh-wb1ju4 жыл бұрын
Great tutorial! Solved half of my problems. Thanks!
@nv72875 жыл бұрын
Awesome thanks so much :) now rolling my little dice happily :)
@AlexanderZotov5 жыл бұрын
:-)
@MillyStories6 жыл бұрын
thnks, actually there´s one on the asset store but very buggy, and this one is simpler to implement, keep the good work
@AlexanderZotov6 жыл бұрын
Thanks for your feedback!
@ekzac4 жыл бұрын
2 years old tutorial, still very good :) But now there is one asset in the Asset Store they used in One Deck Dungeon. I must admit, it is pretty funny to play! =)
@JeffreyHamlin3 жыл бұрын
Works great, consistently rolls same number but that is expected I guess. Tried varying the bounciness and angle of the die, it's not random enough. I think if I add a second dice that collides I will get more random results.
@bheemnegi32292 жыл бұрын
Great content @Alexander, thanks. Wanted to know if this tutorial is for a 2D game or a 3D game ?
@Neerajkumar-mc7wk4 жыл бұрын
When I press space for the first time its okk but when I press second time position of x,y,z keeps increasing also rotation increases.
@theshizon4 жыл бұрын
How do I modify the code to roll 2 dice and add the values together?
@cikselizabeth2 жыл бұрын
I get the null reference error on the line text.text = diceNumber.ToString (); Can you help me?
@kimkaye17122 жыл бұрын
Question: I'm trying to make a pre-determined value to roll a dice. Any tips on how to do it?
@critcheese14114 жыл бұрын
Very helpful. Thank you
@estebanvanegas37186 жыл бұрын
Hey, Alexander. What if I want to ad an specific image to each of the dice sides?
@AlexanderZotov6 жыл бұрын
Hi! Then you have to create a new texture in Photoshop or Gimp with different sides colors.
@himanshutripathi33242 жыл бұрын
Sprite renderer does not show in canvas . Please tell me how to roll dice in canvas
@SuperCarzetin6 жыл бұрын
hi!! thanks for the tutorial, but i have a question... how can i do if i have 2 dices? how can i add both dice numbers to obtain one number in the screen? Thanks man!!
@isaacmort2532 жыл бұрын
Yes I am wondering about this as well!
@flowconstruct2 жыл бұрын
if u want to have a total just make a sum function with the two different dice and connect it do the UI whatever u name them then will go "whateverdice1"+"whateverdice2"
@sadbutnotbad5 жыл бұрын
Thanks for tutorial. If i want to roll few dice objects, how to summ their numbers?
@гугушка-т5й6 жыл бұрын
Perfect tutorial! Thank you very much!
@seanpham72482 жыл бұрын
Anyone know how to creat a dice in 3d unity. . I am working dice game but dont know how to create 2 dices for my game
@zanerTEEVEE4 жыл бұрын
Hey! I dont know if youre active still but what would be the best way for me to have it print certain questions instead of numbers?
@QD8086 жыл бұрын
keeps saying that its not expecting static?
@paulpopSignatur2 жыл бұрын
Great video Thank you. Does anybody how do I assign a UI button to roll the dice again instead of the Spacebar ??
@walney20085 жыл бұрын
hi, you speak game sinuca, billiard ? style 8 BALL POOL ? tnkhs
@dismal3686 жыл бұрын
thanks, awesome tutorial, so usefull, maybe you can make a Slot machine unity 2018 tutorial C# ?
@AlexanderZotov5 жыл бұрын
Did one!
@greenbear97904 жыл бұрын
this is really awesome! simple and nice tutorial!! I want to use more than two dice, what should I do in that case? I made a small check box for each dice and had it follow the x,z coordinates of the dice. it worked but, this method has become complicated when calculating the sum of the values of each dice(like in case the number of dice thrown is random.) Is there any other way you recommend? i would really appreciate if you reply me
@tzachcohen91247 жыл бұрын
col.gameobject.name recognizes the name as dice and not as side1 or side 2 etc. how do I solve this?
@tzachcohen91247 жыл бұрын
Still not working, sometimes it gives the name of the cube and sometimes it gives the name of another collider EDIT: NVM, I got it finally! Listened more carefully and done it! thank you so much
@tzachcohen91247 жыл бұрын
I tried to do a workaround and put the collider above so it gets the upper side, didn't work. In the beginning I put it on the same plane with the floor, didn't work. So finally i tried to put it under the floor, and it worked 😀
@TheGryphonGamer2 жыл бұрын
The dice just falls all the way through the box collider, can someone help me please It doesn't work
@hassannashi31696 жыл бұрын
if i want another dice what i do?
@kareemismael61537 жыл бұрын
Thanks for the great video.. So what if I want to show the number for two dice or more. What should I do? (Say show the number for both dice side by side like 6 - 2 or 3 - 5)
@nsahandler5 жыл бұрын
I hope you've solved this already on your own... You can literally clone the object and then have the output reader run Dice1 + Dice2
@aminanaseer68017 жыл бұрын
after downloaded the model and scripts from the description link how can i import it in unity could anyone help me in that issue??
@appsgames69216 жыл бұрын
just drag and drop each object individually.
@BenjaReaper2 жыл бұрын
If you just name your sides the opposite number, you can instead of the switch use diceNum = int.Parse(other.gameObject.name);
@noticeme5035 жыл бұрын
Спасибо! То что нужно.
@AlexanderZotov5 жыл бұрын
Пожалуйста!
@garrychernoff63606 жыл бұрын
Hi, it's a great job~~ If I want dice show my custom number? exp: showDice(5); how do? Thanks~
@nsahandler5 жыл бұрын
You have to make the model manually and either map it or create it as an object to be imported into Unity and given physics/behavioral dimensions. You could edit the modeled file he included in his download, if you have photoshop or other modeling tools, or even make your own image and make that the image plane of the box. Multiple ways to do it.
@Agentti_Kowalski Жыл бұрын
my dice only goes to transform position but does not move in any other way
@n.aclasheryt48027 жыл бұрын
Will it work fine with a 2d effect??
@n.aclasheryt48027 жыл бұрын
Alexander Zotov its in 3d, i mean will this work if i just turn the camera up?
@n.aclasheryt48027 жыл бұрын
Alexander Zotov ok
@shh92626 жыл бұрын
I'm dysfunctional right now. When I hit the S-Pause button, the dice hit the ground and it starts to spin on its own, and every time I press the S-Pause button, its spin speed increases and the numbers do not show up.
@AlexanderZotov6 жыл бұрын
Oh. Hard to say just like that. There are lot of what can be wrong in your project. On the other hand it can be small mistake that ruins everything)
@zombiegamer10692 жыл бұрын
there is a problem with the script?? it keeps crashing
@zombiegamer10692 жыл бұрын
nvrmind the script name had a space in it
@shh92626 жыл бұрын
I'm having to press the button until it falls to the ground and starts to rotate. Where is the problem, please. Please
@AlexanderZotov6 жыл бұрын
May be you typed if (Input.GetKey(KeyCode.Space)) instead of if (Input.GetKeyDown(KeyCode.Space)) in DiceScript?
@chuasunghui68124 жыл бұрын
When i hit run, the text remains 0 all the time .....
@iliachernoskutov12327 жыл бұрын
spasibo
@TheGreatestHeroEver6 жыл бұрын
I'm getting error "Unexpected symbol 'DiceNumberTextScript'. I've written the DiceCheckZoneScript as in the tutorial. What am I missing?
@AlexanderZotov6 жыл бұрын
Check curly brackets and semicolons.
@TheGreatestHeroEver6 жыл бұрын
Thank you for the quick reply! It was the names of the dice sides that didn't match the script! Awesome tutorial! How would you do it with two die, and add the number rolled to a value? E.g. add the rolled number to a player's health.
@ScholarshipNetworkprofile5 жыл бұрын
very nice tutorial i will sub and like, feedback: maybe a bit better time management, also this video could have been 3 parts (toss/detect/display).
@SnayteLeRoi3 жыл бұрын
when I start my counter remains at 0
@karampalsingh59143 жыл бұрын
WAHEGURU JI DA KHALSA JI WAHEGURU JI DI FATEH JI WAHEGURU JI WAHEGURU JI WAHEGURU JI WAHEGURU JI DHAN GURU NANAK JI DHAN GURU NANAK JI
@shh92626 жыл бұрын
Oops, this program really has a major problem. Please post the correct application