Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I don't know if the same dynamic is true when you manually roll the dice by picking them up. I suspect it is but I do not know.
I think you are wrong here. The dice rolling is still physics based, even if you press R. What the game does is randomly rotate the die, then throw it up in the air. If it were a pregenerated animation, then the die would always land cleanly on a face, which it doesn't do. Also, it can be interrupted and disturbed, which wouldn't be possible if it were an animation.
I might be wrong but you can look at the dice when you R them. It pops up in the air without any rotation then gets a new set of xyz rotational coordinates applied to it and then a rotational velocity also applied to it so that it lands on a specific face. If it was purely "physical" it wouldn't need this, the force used to pop it up from the table could also apply rotational force.
This I suspect is also why you occasionally get chat results that are different from how the actual "physical" die rolled. The chat is reading out the pre-generated result but the physical die was upset by something on the table.
You're right that you can interrupt it though.
Chat doesn't print out the result unless scripting is involved, and at the point scripting is involved it could be affecting the dice roll. If you want to discuss scripted dice rolling then the process is completely dependent upon the scripting.
The standard dice rolling behaviour does what Baryonyx outlines. See my post from the Discord below:
No proof for the above, but it is my opinion after thousands of thousands of hours of modding and scripting experience in TTS, including for payment for various companies. Feel free to experiment and test yourself.
But the point is that it doesn't. I just went into the game to check it again and even did it in locked physics mode. The die sometimes lands cleanly on a face, but by far not every time. If the result were precalculated, then why would it not land cleanly on a face every time?
And another thing, how is it then that the die rises higher if you spam R several times? That would mean the game would now create a longer animation? It just makes little sense.
And finally, if it is not physics based, explain to me the behavior of the dice if you turn gravity off and press R.
It does land cleanly on a face every single time unless you interrupt it or do it on a non-flat surface. I am not sure what you are meaning when you say it doesn't. And if you know the height above ground, which is standard when you R, then you know how much spin you can impart from Face A to Face B.
Let's see if I can make this more clear, since I don't know why you're not understanding.
1) The game works by lifting the die off of the ground.
2) The die is then snapped to a specific facing.
3) A specific amount of rotational velocity is applied to the die.
4) The die then lands on the table face up.
If it was purely physically random there'd be no reason to do step 2. You could achieve randomisation by instead applying a random amount of rotational velocity (and also a random amount of air time would be good).
The only reason to do step 2 is so that you can apply a specific and known amount of rotation to get a specific result on step 4. If you know the dice is going to be in the air for 1 second, and you want it to display the side opposite the one that it has snapped to (for example) then you'd apply a ~180 degree per second amount of rotation to it (you'd actually need to apply more as the corners of the dice might hit the table first but you get the idea.)
Why did you copy and paste a reworded version of what I already typed? :D
We must be playing two different games then, because in my game, the dice don't land cleanly. Even on a standard flat table, without having messed with the physics.
Step 2 and 3 of your list are not really correct, because the amount is not "specific", but random.
I have just gone into the game, spawned a bunch of dice, lined them up neatly with gizmo and pressed R once. See these screenshots below of the results.
https://imgur.com/a/xtpoOVA
If the results were precalculated, why do the dice get messy and wander around?
And if you observe a bunch of dice in a line like this, you should observe that they in fact don't reach the same height every time. Because the height that they get thrown up is also random.
I will record a video if I must, because if you don't have the same observations, we don't play the same game.
Describe what you are experiencing as I can't fathom how you could get ♥♥♥♥♥♥ dice on a flat surface.
Ok. Say you had 4 dice. You set it up so that after popping up each one would go to 1 being the face up die, and you want them all to show 6 as the end result. Each die is going to have 1 second of air time. You will then need to impart ~180 degrees per second to each die. You rotate one die X+ at 180d/s, one X- 180d/s, one Y+ 180d/s, one Y- 180d/s. Each die will then, assuming they are actually physically simulated cubes and not point objects, move in 4 different directions because the dice doesn't immediately land perfectly flat. But you've still imparted enough rotation to guarantee they will land on the correct result on a flat surface.
Also they don't need to all go up the same height. All you need to do is have a table of desired results with specific lift heights, starting rotations, and rotational velocities. (You could also calculate it in real time but that would be pointless and costly.)
The only reason you would have the step 2 I mentioned earlier, where you have the die pop to a pre-set known starting position is so that you can then calculate how to get to a desired end position. The only other possibility is so that you can have minimal dice rotations to stop the dice from moving but as you have said yourself the dice move around, so this obviously isn't the intent. So either they did it for absolutely no reason, which is odd, or they did it so they could get to pre-generated results which is actually a reason and also allows you to have "better" RNG.