|
0 registered members (),
1,738
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Good and real example of 3d dice model
[Re: Realspawn]
#460481
07/02/16 19:42
07/02/16 19:42
|
Malice
Unregistered
|
Malice
Unregistered
|
I'm not sure there is a made example. The number is easy to get. Use a second skin with 6 colors, color point up is == to the rolled number. The dice I'd give over to the physics engine instead of coding it. And for that I can strongly say 3run is the physics king!!
There are about 5 or so others ways to determine which side is facing up. Used vertex numbers of the model use the models pan/tile/roll numbers use a color skin I can think up many. But I've no idea the best or fastest.
|
|
|
Re: Good and real example of 3d dice model
[Re: 3run]
#460484
07/02/16 21:08
07/02/16 21:08
|
Malice
Unregistered
|
Malice
Unregistered
|
I assume the BBox vectors are still valued. get my_x+my_max; my_y+my_max_y my.z+my_max_z and min's ==6 points
rotate by my.pan for loop to find point with the highest world z == side showing/facing up
|
|
|
Re: Good and real example of 3d dice model
[Re: 3run]
#460487
07/02/16 21:37
07/02/16 21:37
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
As I promised, here is the working demo (available from my webpage): Download linkI was making it too complicated.. It's probably too complicated even now, but it's the simplest way I can think of right now. I'll be really grateful if anyone will share his/her more elegant way of determining which side is facing upwards. Best regards!
|
|
|
Re: Good and real example of 3d dice model
[Re: 3run]
#460488
07/02/16 22:00
07/02/16 22:00
|
Malice
Unregistered
|
Malice
Unregistered
|
^-- That's simple awesome!
|
|
|
Re: Good and real example of 3d dice model
[Re: ]
#460489
07/02/16 22:13
07/02/16 22:13
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
^-- That's simple awesome! Thank you man! I really hope that this will be useful! Best regards!
|
|
|
|