+/*
+ * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved
+ */
+
#ifndef PHYSICS_TEST_H
#define PHYSICS_TEST_H
rigidbody marko =
{
.type = k_rb_shape_box,
- .bbx = {{-2.0f,-2.0f,-2.0f},{2.0f,2.0f,2.0f}},
+ .bbx = {{-0.5f,-0.5f,-0.5f},{0.5f,0.5f,0.5f}},
.co = {-36.0f,8.0f,-36.0f},
.q = {0.0f,0.0f,0.0f,1.0f},
.is_world = 0
};
rigidbody ball = { .type = k_rb_shape_sphere,
- .inf.sphere = { .radius = 4.0f },
+ .inf.sphere = { .radius = 2.0f },
.co = {0.0f,20.0f,2.0f},
.q = {0.0f,0.0f,0.0f,1.0f}},
{
for( int i=0; i<vg_list_size(jeffs); i++ )
{
- v3_zero( jeffs[i].v );
- v3_zero( jeffs[i].w );
v3_copy( (v3f){ (vg_randf()-0.5f) * 10.0f,
(vg_randf()-0.5f) * 10.0f + 17.0f,
(vg_randf()-0.5f) * 10.0f }, jeffs[i].co );
jeffs[i].type = k_rb_shape_capsule;
jeffs[i].inf.capsule.radius = 0.75f;
- jeffs[i].inf.capsule.height = 8.0f;
+ jeffs[i].inf.capsule.height = 3.0f;
rb_init( &jeffs[i] );
}
}
}
- free( mdl );
+ vg_free( mdl );
scene_bh_create( &epic_scene );
rb_init( &epic_scene_rb );
/* POSITION OVERRIDE */
{
- if(glfwGetKey( vg_window, GLFW_KEY_L ))
+ if(glfwGetKey( vg.window, GLFW_KEY_L ))
{
m4x3_mulv( player.camera, (v3f){0.0f,0.0f,-5.0f}, marko.co );
v3_zero( marko.v );
v3_zero( marko.w );
}
- if(glfwGetKey( vg_window, GLFW_KEY_K ))
+ if(glfwGetKey( vg.window, GLFW_KEY_K ))
{
m4x3_mulv( player.camera, (v3f){0.0f,0.0f,-5.0f}, ball.co );
v3_zero( ball.v );
v3_zero( ball.w );
}
- if(glfwGetKey( vg_window, GLFW_KEY_J ))
+ if(glfwGetKey( vg.window, GLFW_KEY_J ))
{
m4x3_mulv( player.camera, (v3f){0.0f,0.0f,-5.0f}, ball1.co );
v3_zero( ball1.v );
v3_zero( ball1.w );
}
- if(glfwGetKey( vg_window, GLFW_KEY_H ))
+ if(glfwGetKey( vg.window, GLFW_KEY_H ))
{
reorg_jeffs();
}