projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implemented metascene spawn point/rot
[laserbrain_demo]
/
src
/
app.cc
diff --git
a/src/app.cc
b/src/app.cc
index
9e5eba3
..
665ded4
100644
(file)
--- a/
src/app.cc
+++ b/
src/app.cc
@@
-32,7
+32,7
@@
SceneSet sceneman;
unsigned int sdr_ltmap, sdr_ltmap_notex;
static float cam_dist = 0.0;
unsigned int sdr_ltmap, sdr_ltmap_notex;
static float cam_dist = 0.0;
-static float cam_theta, cam_phi = 20;
+static float cam_theta, cam_phi;
static Vec3 cam_pos;
static float floor_y; // last floor height
static float user_eye_height = 165;
static Vec3 cam_pos;
static float floor_y; // last floor height
static float user_eye_height = 165;
@@
-105,7
+105,9
@@
bool app_init(int argc, char **argv)
}
cam_pos = mscn->start_pos;
}
cam_pos = mscn->start_pos;
- // TODO use start_rot
+ Vec3 dir = rotate(Vec3(0, 0, 1), mscn->start_rot);
+ dir.y = 0;
+ cam_theta = rad_to_deg(acos(dot(dir, Vec3(0, 0, 1))));
if(!(sdr_ltmap_notex = create_program_load("sdr/lightmap.v.glsl", "sdr/lightmap-notex.p.glsl"))) {
return false;
if(!(sdr_ltmap_notex = create_program_load("sdr/lightmap.v.glsl", "sdr/lightmap-notex.p.glsl"))) {
return false;