Daddy needs a new pair of RAM!
edit: the fps are way better in smaller terminal windows with lower character count but then it’s hard to make out the dice. D:
edit2: code here (expires in 2 weeks)
Daddy needs a new pair of RAM!
edit: the fps are way better in smaller terminal windows with lower character count but then it’s hard to make out the dice. D:
edit2: code here (expires in 2 weeks)
maybe just “if velocity < 0.01, find which side is closest to the floor, and if its within 1mm of the floor, take the opposite side (the one facing up) as the answer”
The only edge case I can think of is if it gets close to balancing on an edge, and then finally tips over to one side or the other. But in that case I don’t think the face closest to the floor would be within 1mm of the floor, so it should still work.
that’s how it’s implemented, mostly, but sometimes dice “stop” while they’re still tilted and standing on a corner (and then roll back down, possibly going back more than 1 face) so there’s also that.
Ok well there’s probably a dozen different ways to tackle this issue but I’ll let you explore them since that’s part of the fun (and I’m lazy lol)