Fix snap dist

main
Cameron Murphy Reikes 2 years ago
parent a72c392d4d
commit b99a4076b8

@ -262,7 +262,7 @@ static void frame(void)
hand_pos = V2scale(V2normalize(hand_pos), hand_len);
hand_pos = V2add(hand_pos, gs.players[myplayer].pos);
struct Grid *placing_grid = closest_to_point_in_radius(&gs, hand_pos, 0.35f);
struct Grid *placing_grid = closest_to_point_in_radius(&gs, hand_pos, BUILD_BOX_SNAP_DIST_TO_SHIP);
if (placing_grid == NULL)
{
build_preview = (struct BuildPreviewInfo){

@ -1,10 +1,11 @@
#pragma once
#define MAX_PLAYERS 4
#define BOX_SIZE 0.5f
#define BOX_SIZE 0.25f
#define MAX_HAND_REACH 1.0f
#define GOLD_COLLECT_RADIUS 0.3f
#define MAX_GRIDS 32
#define BUILD_BOX_SNAP_DIST_TO_SHIP 0.2f
#define MAX_BOXES_PER_GRID 32
#define BOX_MASS 1.0f
#define TIMESTEP (1.0f / 60.0f) // not required to simulate at this, but this defines what tick the game is on

Loading…
Cancel
Save