Either would work. Using on pc.Entity means that pure graph nodes can’t access the function
I don’t understand the question? this.getRotation() means that you are calling getRotation()on the same graphNode that getYaw was called on.
It’s one of the ways I’ve used in the Orbit Camera script in the Model Viewer Starter Kit. I’ve not double check the math and you may get gimbal lock issues.
pc.Entity inherits from pc.GraphNode. If you add the function to pc.Entity, anything that is just a pc.GraphNode and not an pc.Entity cannot access the function.
Either would work. Depends on your needs. In general, there’s no harm adding it to pc.GraphNode unless you need pc.Entity specific properties/functions in it.