Changeset 1716 for trunk/games


Ignore:
Timestamp:
Aug 11, 2012, 1:57:48 AM (8 years ago)
Author:
Jnat
Message:
 
Location:
trunk/games/demo-jnat
Files:
2 edited

Legend:

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

    r1715 r1716  
    7474        m_angle = 0;
    7575
     76        m_camera->SetTarget(m_player->m_position);
     77
    7678    mat4 anim = mat4::rotate(m_angle, vec3(0, 1, 0));
    7779    mat4 model = mat4::translate(vec3(0, 0, 0));
  • trunk/games/demo-jnat/player.h

    r1715 r1716  
    3232        WorldEntity::TickGame(seconds);
    3333
     34        float test = lol::sin(0.5f) * 200.f + 60.f;
     35        m_rotation *= quat::rotate(seconds * test, vec3(0, 1, 0));
    3436
     37        m_velocity = 120.f * m_rotation.transform(vec3(0, 0, 1));
     38        vec3 deltapos = seconds * m_velocity;
     39        m_position += deltapos;
    3540    }
    3641
     
    5358    EasyMesh m_bodymesh;
    5459    Stick *m_stick;
    55 
     60       
    5661    bool m_ready;
    5762};
Note: See TracChangeset for help on using the changeset viewer.