View Single Post

JCF Member

Joined: Jan 1970

Posts: 9

Zero[CDF] has disabled reputation

Nov 29, 2020, 02:32 AM
Zero[CDF] is offline
Reply With Quote
Some sort of camera_behaviour function or interface for players

Let's say the player is swimming/floating, and I implement a transformation that, upon activation, moves the player 32 pixels above where he was in an un-transformed state. Since I can set xPos and yPos in onPlayer(), this is easy. The problem is the camera. I want to be able to say to the camera:
"Keep the normal camera behavior when the transformation is inactive, but when it is active, act as if the player is 32 pixels below his actual position." I can't do that with cameraUnfreeze and cameraFreeze. I tried to, but you always get a noticeable jitter when the transformation activates or deactivates. I think I'd need access to a player's "camera behavior" method, so I can write my own as a wrapper around the default method.