Skip to content

Instantly share code, notes, and snippets.

View nebular's full-sized avatar
💭
nothin´

Nebular Streams nebular

💭
nothin´
View GitHub Profile
@nebular
nebular / gist:81025fdb25ed6cc7b563437948ad3989
Last active May 4, 2024 15:00
PAtch to complete moving platforms in Hero - it detects in SelfRay whwn it lands and leaves a kinetic platform, then adjusts the speed. Note: For this to work, the kinetic platform has to calculate its speed and keep updating its own velocity field (this.velocity)
stopMoving() {
const v = this.v;
const o = this.option;
v.moveImpulse.set(0, 0, 0);
// RLP: Moving platforms also affect when not using controle
if (v.isOnMovingObject) {