throwing dice
Blitz3D Forums/Blitz3D Beginners Area/throwing dice
| ||
OK so I create a dice model in JTEdit [good program] and I load the .X file and can manipulate and rotate it. I can't seem to make the connection on how to make it bounce off a plane. Yes... the plane is flat (A table or box) but do I need a physics engine just for this? I don't think I have treat the dice (two of them) as particles do I? |
| ||
A dice bouncing on a table is no way a simple task, if you want it to act correct you will need a somewhat advanced physics engine. |
| ||
You can fake it pretty easily (basically like a tumbling ball), but if you want real physics, well, then that's what you'll have to use. |
| ||
I was just figuring on faking it... letting RAND figure what number would come up then a little bouncey for show and PLOP goes the number... |
| ||
OK there is no way getting around it... I was trying to be fancy but I really don't understand TYPE... When I run the following code:; Define the Dice Type Type dice1 Field face Field X Field Y Field z End Type ; ==-=-=-=-=-=-=- OK six dice are created ; NOW for the location of the numbered face ; =-=-=-= ; this may have to change For t = 1 To 24 die1.dice1=New dice1 die1\face=1 die1\x=0 die1\y=0 die1\z=0 die1\face=2 die1\x=90 die1\y=0 die1\z=0 die1\face=3 die1\x=0 die1\y=270 die1\z=0 die1\face=4 die1\x=0 die1\y=90 die1\z=0 die1\face=5 die1\x=270 die1\y=0 die1\z=0 die1\face=6 die1\x=0 die1\y=180 die1\z=0 Next tI get a " t is not a function " So how do I load the data? Should I just run a simpler array? I am trying to set up a store of coordinates to show what was rolled on a .X dice after the number is selected. |
| ||
This is not really a job for types, and you are using them wrong anyway. About the next command, you just need to write "Next" not "Next t" |
| ||
Yeah... I simplify simplify simplify... I was trying to be too fancy and see if a new dataset could work this... |