Skip to content

Instantly share code, notes, and snippets.

View tombasche's full-sized avatar

Thomas Basche tombasche

  • Helsinki, Finland
View GitHub Profile
@tombasche
tombasche / CameraController.cs
Created December 9, 2023 08:25
cinemachine top down camera
using UnityEngine;
using Cinemachine;
public class CameraController : MonoBehaviour
{
[SerializeField] private CinemachineVirtualCamera cinemachineVirtualCamera;
private const float MIN_FOLLOW_Y_OFFSET = 2f;
private const float MAX_FOLLOW_Y_OFFSET = 12f;
@tombasche
tombasche / blender_batch_export.py
Created October 30, 2024 11:18
Batch export selected objects from Blender to FBX
import bpy
import os
from copy import copy
# export to blend file location
basedir = os.path.dirname(bpy.data.filepath)
if not basedir:
raise Exception("Blend file is not saved")
@tombasche
tombasche / MazeGenerator.cs
Created November 9, 2024 09:42
Generating a "perfect" maze using recursive backtracking
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class MazeGenerator : MonoBehaviour
{
[SerializeField]
int seed;