Skip to content

Instantly share code, notes, and snippets.


Nick rioter00

View GitHub Profile
View MouseLookAt.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MouseLookAt : MonoBehaviour
// if your character is rotating but off a fixed angle, adjust this value, likely will be 90 or -90 (degrees)
[SerializeField] int angleOffset;
// Update is called once per frame
rioter00 / client.js
Created Mar 30, 2020 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for clients to join
View client.js
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);