diff --git a/res/graphics/gun.ase b/res/graphics/gun.ase index f4c0fb54..b1fa5c43 100644 --- a/res/graphics/gun.ase +++ b/res/graphics/gun.ase @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de3672f63e3c7664928434d2d6211834fa891cf081574a7016d63a2997d0f400 -size 700 +oid sha256:73cb4a354807bac2327d6e6d531385ef0a8c3935019bf0e93c033094519908e4 +size 743 diff --git a/res/graphics/tim.ase b/res/graphics/tim.ase index 438b0c85..64e7efae 100644 --- a/res/graphics/tim.ase +++ b/res/graphics/tim.ase @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec0a7a4b08a43993c8f8745e08057db4e2f04aa1b83ee109e395a838e897d87e -size 4191 +oid sha256:04f924874a610ead86b474ce4b2299eed812a56b88bbb99f82c06c9098269786 +size 3856 diff --git a/src/sim.c b/src/sim.c index d401e7c4..95833f0a 100644 --- a/src/sim.c +++ b/src/sim.c @@ -188,17 +188,16 @@ INTERNAL struct sim_ent *spawn_test_player(struct sim_ctx *ctx) e->inertia_unscaled = 5; } - e->local_collider.points[0] = v2_with_len(V2(0.08f, 0.17f), 0.15f); - e->local_collider.points[1] = v2_with_len(V2(-0.07f, -0.2f), 0.15f); - e->local_collider.count = 2; - e->local_collider.radius = 0.075f; - //e->sprite = sprite_tag_from_path(LIT("res/graphics/box_rounded.ase")); //e->sprite_span_name = LIT("idle.unarmed"); //e->sprite_span_name = LIT("idle.one_handed"); e->sprite_span_name = LIT("idle.two_handed"); e->layer = SIM_LAYER_SHOULDERS; + e->local_collider.points[0] = V2(0, 0); + e->local_collider.count = 1; + e->local_collider.radius = 0.2f; + struct xform xf = XFORM_TRS(.t = pos, .r = r, .s = size); //xf.bx.y = -1.f; @@ -1006,7 +1005,7 @@ void sim_update(struct sim_ctx *ctx, i64 target_dt_ns) joint_ent = sim_ent_alloc(root); joint_ent->mass_unscaled = F32_INFINITY; joint_ent->inertia_unscaled = F32_INFINITY; - sim_ent_enable_prop(joint_ent, SIM_ENT_PROP_PHYSICAL_KINEMATIC); /* Since we'll be setting velocity */ + sim_ent_enable_prop(joint_ent, SIM_ENT_PROP_PHYSICAL_KINEMATIC); /* Since we'll be setting velocity manually */ sim_ent_enable_prop(joint_ent, SIM_ENT_PROP_MOTOR_JOINT); sim_ent_enable_prop(joint_ent, SIM_ENT_PROP_ACTIVE); ent->aim_joint = joint_ent->handle; @@ -1022,7 +1021,6 @@ void sim_update(struct sim_ctx *ctx, i64 target_dt_ns) /* Set correction rate dynamically since motor velocity is only set for one frame */ joint_ent->motor_joint_data.correction_rate = 10 * world_dt; - /* Solve for final angle using law of sines */ f32 new_angle; {