Skip to content

Instantly share code, notes, and snippets.

View cdfisher's full-sized avatar

Chris cdfisher

  • Boston
View GitHub Profile
@cdfisher
cdfisher / InvKinematics.cs
Last active November 4, 2025 21:17
Inverse kinematics Unity MonoBehavior for a single joint
using UnityEngine;
using System;
public class InvKinematics : MonoBehaviour
{
public double about_x; // x to rotate about
public double about_y; // y to rotate about
public double x_init; // initial x
public double y_init; // initial y
public double x_prime; // final x
using UnityEngine;
public class Orbiter : MonoBehaviour
{
public GameObject Sun;
public GameObject Earth;
public GameObject Moon;
private Vector3 sunPos;
private Vector3 earthPos;