You are browsing as a guest. Sign up (or log in) to start making projects!

1h 34m 56s logged

Devlog #9πŸ“

Prepare

  • 🟩 Learn godot

Create basic line addition

  • 🟩 Static line on mouse enter/exit

Filter valid lines

  • 🟩 only cross two sides
  • 🟩 mouse clicking (cut mode on)
  • 🟩 mouse velocity high enough
  • πŸŸ₯ Stops counting after 0.2 seconds

Shape as polygon

  • πŸŸ₯ Rename rect / _get_rect_local() -> polygon equivalents (correct calc)
  • πŸŸ₯ Rename rect_edges / _get_rect_edges() -> polygon edge list (correct calc)
  • πŸŸ₯ Store shape as a point list
  • πŸŸ₯ Render shape from that point list (Polygon2D)
  • πŸŸ₯ Match collider to the same points (CollisionPolygon2D)
  • πŸŸ₯ _is_inside` uses Geometry2D.is_point_in_polygon
  • πŸŸ₯ Enter/exit hits use polygon edges (not just 4 rect sides)

Perform a real cut

  • πŸŸ₯ On valid swipe, get enter + exit points on the polygon
  • πŸŸ₯ Split the point list into two polygons along that cut
  • πŸŸ₯ Replace the old shape with the two new shapes (visual + collider)
  • πŸŸ₯ Remove / ignore the cut line after the split (or keep as VFX only)

Cut pieces move

  • πŸŸ₯ Put each piece on its own body (RigidBody2D or AnimatableBody2D / manual motion)
  • πŸŸ₯ On split, give each piece a velocity away from the cut (impulse / linear_velocity)
  • πŸŸ₯ Optional: add gravity / spin so pieces fall and rotate
  • πŸŸ₯ Optional: despawn pieces after a short time or off-screen

Stop here (matches β€œuntil pieces move”) πŸ›‘

  • πŸŸ₯ One shape -> swipe -> two pieces fly apart

(i used ai to make this devlog but it just turned my attachment into markdown, that’s all)

0
33

Comments 0

No comments yet. Be the first!