Skip to content
Snippets Groups Projects
Commit 0b93d2dd authored by Noé's avatar Noé
Browse files

Timer RAS

parent 973237b1
No related branches found
No related tags found
No related merge requests found
......@@ -236,7 +236,7 @@ void scene_structure::display_bat(vec3 p)
//Orientation and position of the bird along the path
//Orientation and position of the bat along the path
float t = timer_mvt.t;
vec3 p2;
if (t + 0.1f > timer_mvt.t_max) p2 = interpolation(0.01f, keyframe.key_positions, keyframe.key_times, gui.k);
......@@ -356,7 +356,7 @@ void scene_structure::display_gui()
void scene_structure::display_ball() {
bouncing.simulate(timer_chain.scale * 0.01f, terrain_length);
bouncing.simulate(timer.scale * 0.01f, terrain_length);
for (int i = 0; i < bouncing.N; i++) {
bouncing.mesh.model.translation = bouncing.pos[i];
bouncing.mesh.material.color = bouncing.color[i];
......@@ -366,7 +366,7 @@ void scene_structure::display_ball() {
void scene_structure::display_projectiles() {
projectiles.simulate(timer_chain.scale * 0.03f, terrain_length);
projectiles.simulate(timer.scale * 0.03f, terrain_length);
for (int i = 0; i < projectiles.N; i++) {
projectiles.mesh.model.translation = projectiles.pos[i];
projectiles.mesh.material.color = projectiles.color[i];
......
......@@ -47,10 +47,10 @@ struct scene_structure : cgp::scene_inputs_generic {
// ****************************** //
// Elements and shapes of the scene
// ****************************** //
// Timer used for the animation
cgp::skybox_drawable skybox;
// Timer used for the animation
timer_basic timer;
cgp::mesh_drawable terrain;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment