AlexCharlton / Hypergiant

An OpenGL-based game library for CHICKEN Scheme
BSD 2-Clause "Simplified" License
68 stars 5 forks source link

Rotating around a point #14

Open liamdiprose opened 2 years ago

liamdiprose commented 2 years ago

I'm trying to rotate a node around the center of the scene (0.5 0.5). For example, making a "moon" node orbit around a central point, tidally locked.

How can I apply this transformation matrix to the node's position and rotation in hypergiant?

I've read on some fourms that I need to 1. translate, then, 2. rotate. But its not clear how they can be applied to a node because the "Prototype to Polish" example only demonstrates rotating with quaternions.

Can someone demonstrate how to rotate a node around a point?