Tag Info

Hot answers tagged

3

Why not this way? Much easier? damagePerSecond = averageDamage * fireRatePerSecond * accuracy Example: damagePerSecond = 140 * 10 * 0.09


2

Iterating through the faces: faceNormal[i].dot(-worldViewVector) > 0.8 //(should actually be >0.9999) If you do an if/switch to apply a rotation to the cube(or camera): Just update and store a value indicating the front face at the same time. This actually works the same for non-snapping angles such as your scene view. In the orthogonal mode, the ...


1

Expressed as a GLSL fragment shader (untested): const float M_1_PI = 1.0 / 3.1415926535897932384626433832795; const float M_1_2PI = 1.0 / 6.283185307179586476925286766559; uniform sampler2D texture1; varying vec3 v_normal; void main(void) { vec3 n_normal = normalize(v_normal); vec2 texture_coordinate; texture_coordinate.x = 0.5 - ...



Only top voted, non community-wiki answers of a minimum length are eligible