Skip to content

Instantly share code, notes, and snippets.

View digitalbreed's full-sized avatar

Matthias Gall digitalbreed

View GitHub Profile
@digitalbreed
digitalbreed / gist:0addad5afbe9eeb762e656122dee53ee
Created July 10, 2024 09:58
Enhanced RVR's Game Creator 2 / Ragdoll Animator 2 integration from https://www.youtube.com/watch?v=3IepLlMrpzk to take note of the position delta between Controller and Ragdoll. This is to avoid that the Controller is positioned too low upon position swap.
using UnityEngine;
using System.Collections;
public class PositionSwapper : MonoBehaviour
{
// GameObject fields for Controller, Mannequin, and Ragdoll
public GameObject Controller;
public GameObject Mannequin;
public GameObject Ragdoll;
// Load Synty Studio art pack FBX models with THREE.js
// Remarks:
// * Assumes the POLYGON City pack in subdirectory models/PolygonCity, adjust directories and filenames as you need
// * Relies on submesh naming conventions to assign glass material; if it doesn't work for your FBX, double-check that the glass actually ends with "_Glass"
// * Uses async/await to improve the readability and traceability of the program flow
// Standard THREE initialization code
import * as THREE from 'three'
import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader'
.radial-progress {
$circle-size: 120px;
$circle-background: #d6dadc;
$circle-color: #97a71d;
$inset-size: 90px;
$inset-color: #fbfbfb;
$transition-length: 1s;
$shadow: 6px 6px 10px rgba(0,0,0,0.2);
$percentage-color: #97a71d;
$percentage-font-size: 22px;
@digitalbreed
digitalbreed / AnimatedSceneSetup.cs
Last active December 5, 2023 23:33
Animated Scene Setup - animates an entire subtree to demonstrate a scene setup as shown in https://twitter.com/digitalbreed/status/1732084984603701429
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
// Needs DOTween: https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676
using DG.Tweening;
namespace Prefabby
{

Keybase proof

I hereby claim:

  • I am digitalbreed on github.
  • I am digitalbreed (https://keybase.io/digitalbreed) on keybase.
  • I have a public key ASCRSSGkg9ATdSIHOerNI7W28pj7d8HFN-VmYxvuM0Am6go

To claim this, I am signing this object: