Skip to content

Instantly share code, notes, and snippets.

@AaronTrotter
AaronTrotter / TerrainSounds.cs
Last active March 9, 2023 02:09
Terrain Footsteps Unity
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class TerrainSounds : MonoBehaviour
{
public Terrain terrain;
public List<TerrainTexDef> terrainLayers = new List<TerrainTexDef>();
@AaronTrotter
AaronTrotter / UE4ClearCache.bat
Last active May 18, 2020 14:30
Clear UE4 Binaries, Intermediate and Regenerate VS
@ECHO OFF
set dt=%DATE:~6,4%.%DATE:~3,2%.%DATE:~0,2%-%TIME:~0,2%.%TIME:~3,2%.%TIME:~6,2%
set dtstamp=%dt: =0%
set projectPath=""
set projectName=""
setlocal enableDelayedExpansion
set /a ID=0
@AaronTrotter
AaronTrotter / SimpleLightFlicker.cs
Last active February 8, 2019 10:45
Unity Simple Light Flicker
// Aaron Trotter aarontrotter.co.uk 2019
// Free to use and modify.
// Do give credit where credit due.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SimpleLightFlicker : MonoBehaviour
{
@AaronTrotter
AaronTrotter / SimpleMovement.cs
Created February 8, 2019 10:44
Unity Simple Movement
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SimpleMovement : MonoBehaviour
{
public float mainSpeed = 100.0f; //regular speed
float shiftAdd = 250.0f; //multiplied by how long shift is held. Basically running
float maxShift = 1000.0f; //Maximum speed when holdin gshift
float camSens = 0.25f; //How sensitive it with mouse
@AaronTrotter
AaronTrotter / SimpleFollowScript.cs
Created January 31, 2019 17:39
Unity Simple Follow Script
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SimpleFollowScript : MonoBehaviour
{
public bool followPosition = true;
public bool followRotation = true;