Skip to content

Instantly share code, notes, and snippets.

View Tattomoosa's full-sized avatar

Matt O'Tousa Tattomoosa

View GitHub Profile
@Tattomoosa
Tattomoosa / Platformer2Point5D_Path
Last active July 9, 2022 03:37
A Unity class that calculates a forward vector from the tangent of a point on a 'BGCurve' closest to a given point, used in my 2.5D Platformer Engine.
using UnityEngine;
using BansheeGz.BGSpline.Curve;
[RequireComponent(typeof(BansheeGz.BGSpline.Curve.BGCurve))]
public class Platformer2Point5D_Path : MonoBehaviour {
private BGCurve curve;
private BGCurveBaseMath math;
void Start () {
@Tattomoosa
Tattomoosa / DynamicRouter.vue
Last active April 28, 2018 01:17
Vue Router component that auto populates with links to every route
<!-- inspired by https://stackoverflow.com/questions/36120996/get-all-routes-in-a-vue-router/36128368 -->
<template>
<div>
<span v-for="route in routes" :key="route.name">
<router-link :to="route.path">{{ route.name }}</router-link>
</span>
</div>
</template>
<script>