Ignore:
Timestamp:
Aug 12, 2012, 11:06:22 PM (10 years ago)
Author:
Jnat
Message:

omg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/games/demo-jnat/demo-jnat.cpp

    r1716 r1723  
    4040        // set color
    4141    m_mesh.Compile("sc#221 scb#1c1");
    42         m_mesh.AppendFlatChamfBox(vec3(1000, 10, 500), 1.f);
     42        m_mesh.OpenBrace();
     43        m_mesh.AppendFlatChamfBox(vec3(500, 50, 100), 1.f);
     44        m_mesh.CloseBrace();
     45        m_mesh.OpenBrace();
     46        m_mesh.AppendFlatChamfBox(vec3(500, 50, 100), 1.f);
     47        m_mesh.Translate(vec3(-300, -100,0));
     48        m_mesh.AppendFlatChamfBox(vec3(100, 200, 100), 1.f);
     49        m_mesh.Translate(vec3(900, 100,0));
     50        m_mesh.CloseBrace();
    4351
    4452        m_player = new Player();
     53        m_player->m_position = vec3(0.f,30.f,30.f);
    4554        Ticker::Ref(m_player);
    46 
    47     /* Center everything -- is it needed? */
    48     //m_mesh.Compile("tx4 tz4");
    4955
    5056    m_camera = new Camera(vec3(0.f, 600.f, 0.f),
    5157                            vec3(0.f, 0.f, 0.f),
    5258                            vec3(0, 1, 0));
    53     m_camera->SetPerspective(70.f, 960.f, 600.f, .1f, 1000.f);
     59    m_camera->SetPerspective(20.f, 960.f, 600.f, .1f, 1000.f);
    5460    m_camera->SetTarget(vec3(0.f, 0.f, 0.f));
    55     m_camera->SetPosition(vec3(0.f, 80.f, -100.f));
     61    m_camera->SetPosition(vec3(0.f, 60.f, 100.f));
    5662    Ticker::Ref(m_camera);
    5763
     
    7480        m_angle = 0;
    7581
    76         m_camera->SetTarget(m_player->m_position);
    77 
     82        m_camera->SetTarget(m_player->m_position + vec3(0.f,100.f,0.f));
     83        m_camera->SetPosition(m_player->m_position + vec3(0.0f, 0.0f, 1000.0f));
    7884    mat4 anim = mat4::rotate(m_angle, vec3(0, 1, 0));
    7985    mat4 model = mat4::translate(vec3(0, 0, 0));
Note: See TracChangeset for help on using the changeset viewer.