added mesh rendering
This commit is contained in:
@@ -23,15 +23,16 @@ void CLight::Precache()
|
||||
void CLight::Spawn()
|
||||
{
|
||||
px_collider_params params = {};
|
||||
params.friction = 0;
|
||||
col = px_box(1, 1, 1, params);
|
||||
params.friction = 0.7;
|
||||
col = px_box(0.5,0.5,0.5, params);
|
||||
px_matrix mat = {};
|
||||
mat.m[0] = 1;
|
||||
mat.m[4] = 1;
|
||||
mat.m[9] = 1;
|
||||
mat.m[5] = 1;
|
||||
mat.m[10] = 1;
|
||||
mat.m[15] = 1;
|
||||
mat.m[3]=-10;
|
||||
mat.m[11]=10;
|
||||
mat.m[7]=-4;
|
||||
mat.m[3]=12;
|
||||
px_rigidbody_params param = {};
|
||||
param.gravity_scale = 1;
|
||||
m_body=px_rigidbody(px, col, mat, param);
|
||||
@@ -43,8 +44,9 @@ void CLight::Destroy()
|
||||
}
|
||||
void CLight::Think( float fDelta )
|
||||
{
|
||||
px_vec3 pos = px_getposition(px, m_body);
|
||||
V_printf("%p %f %f %f\n",col, pos.m[0], pos.m[1], pos.m[2]);
|
||||
px_matrix pos = px_getmatrix(px, m_body);
|
||||
V_memcpy(m_matrix, pos.m, 64);
|
||||
V_printf("%p %f %f %f\n",col, pos.m[12], pos.m[13], pos.m[14]);
|
||||
};
|
||||
|
||||
DECLARE_ENTITY(light, CLight)
|
||||
|
||||
Reference in New Issue
Block a user