Posts: 205
Threads: 6
Joined: Oct 2012
Thanks: 14
Given 17 thank(s) in 9 post(s)
19 Apr 13, 12:09AM
(This post was last modified: 19 Apr 13, 01:23AM by TheNihilanth.)
What are the dimension (size length and units) for a cube in AC?
Edit: I misspelled 'measurements' can't change thread title.
Posts: 80
Threads: 1
Joined: Jul 2010
Thanks: 0
Given 0 thank(s) in 0 post(s)
I'm just going to ballpark it and say about 25 centimeters.
Posts: 3,462
Threads: 72
Joined: Jun 2010
Thanks: 5
Given 3 thank(s) in 3 post(s)
uhhh, iirc 2 cubes ~1 foot. I forgot exactly though. There is a comment in the source about it.
You can full edit your original post to have a different title. Its right above the main text area.
Posts: 3,462
Threads: 72
Joined: Jun 2010
Thanks: 5
Given 3 thank(s) in 3 post(s)
19 Apr 13, 05:23PM
(This post was last modified: 19 Apr 13, 05:23PM by Ronald_Reagan.)
physics.cpp:353
const float CUBES_PER_METER = 4; // assumes 4 cubes make up 1 meter
I'm not exactly sure what you are asking, but this is the "real" conversion from cube to metric. The variable is only used once though, for physics calculations.
Posts: 205
Threads: 6
Joined: Oct 2012
Thanks: 14
Given 17 thank(s) in 9 post(s)
20 Apr 13, 06:33AM
(This post was last modified: 20 Apr 13, 06:37AM by TheNihilanth.)
Well I think I got it.
Let:
w be the point in world space,
M be the model view matrix,
N be the projection matrix,
R be the product of M*N,
v be a 2D point in view space,
w = inverse(R)*v
For the z-depth value I don't know, it could be anything...anyways implementing the above equation would give accurate results in order to get vertex positions of a cube and therefore to know its measures, but there should be another EVEN MORE easy way...