Changeset 1743


Ignore:
Timestamp:
Aug 15, 2012, 12:52:11 AM (7 years ago)
Author:
Jnat
Message:
 
Location:
trunk/games/demo-jnat
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/games/demo-jnat/bo.h

    r1741 r1743  
    1717      : m_ready(false)
    1818    {
    19                 m_bodymesh.Compile("[sc#f20 afcb2 15 2 0.4 ty7.5]");
     19                m_bodymesh.Compile("[sc#f20 afcb15 2 2 0.4 tx7.5]");
    2020    }
    2121
  • trunk/games/demo-jnat/demo-jnat.cpp

    r1739 r1743  
    2525
    2626#include "core.h"
     27#include "loldebug.h"
    2728
    2829using namespace std;
     
    6566    m_camera->SetPosition(vec3(0.f, 60.f, 100.f));
    6667    Ticker::Ref(m_camera);
    67 
    6868    m_ready = false;
    6969}
     
    112112{
    113113    Application app("Jnat Demo", ivec2(960, 600), 60.0f);
    114     new DemoJnat();
     114
     115#if defined _MSC_VER && !defined _XBOX
     116    _chdir("..");
     117#elif defined _WIN32 && !defined _XBOX
     118    _chdir("../..");
     119#endif
     120
     121        new DebugFps(5, 5);
     122        new DemoJnat();
    115123    app.Run();
    116124
  • trunk/games/demo-jnat/player.h

    r1742 r1743  
    6767                if (rightleft * rightleft + updown * updown > 0.2f){
    6868                        m_velocity = vec3(rightleft,0,0);//120.f * m_rotation.transform(vec3(0, 0, 1));
    69                         vec3 deltapos = 200.f* seconds * m_velocity;
     69                        vec3 deltapos = 200.f * seconds * m_velocity;
    7070
    7171                        m_position += deltapos;
    7272                }
    73                 m_bo->m_position = (m_position + vec3(0.0f,5.0f,10.0f) );
     73                m_bo->m_position = (m_position + vec3(0.0f,10.0f,10.0f) );
    7474
    75                 float angle = lol::atan2(-lookX,lookY);
    76                 quat q = quat::rotate(angle*( 180 / M_PI ),vec3(0.0f,0.0f,1.0f));
     75                float angle = lol::atan2(lookY,lookX);
     76                quat q;
     77                if (lookX * lookX + lookY * lookY > 0.2f){
     78                        q = quat::rotate(angle*( 180 / M_PI ),vec3(0.0f,0.0f,1.0f));
     79                }else{
     80                        q = quat::rotate(0,vec3(0.0f,0.0f,1.0f));
     81                }
    7782                m_bo->m_rotation = q;
    7883                //m_bo->m_rotation.printf();
Note: See TracChangeset for help on using the changeset viewer.