Create Barebones Transform Node Camera

Yo @Deltakosh or maybe @sebavan … In Unity… There is not really a separate Camera API that you use to move and rotate a camera. You basically just move and rotate the Transform the camera component is attached to. In Babylon, i need to create a TransformCamera sub-class of BABYLON.Camera. I need to use this lower level base class that only implements the concept of a camera position and rotation that will be manually set. (Really only set once on creation)

This new TransformCamera is designed to be a Child Node of a regular TransformNode. I will move the TransformNode around and never touch the actual camera position and rotation directly.

I need this camera to NOT have any concepts of CheckInputs or CameraDirection or CameraRotation or basically anything to do with this camera moving or rotating (Other than directly setting the transform camera position or rotation).

I tried just sub-classing the BABYLON.Camera

export class TransformCamera extends BABYLON.Camera

But the camera is always at position 0,0,0 and never moves even when i directly set the camera.position. So there is obviously a minimum set of functions or properties that my camera sub class has to provide to make it work. It looks like all camera are somehow sob-classed from TargetCamera… But i cant tell from TargetCamera what i need to provide in my BABYLON.Camera sub-class to get it to support just position and rotation (rotationQuaternion)

Please Help… What are the barebones functions and or properties do i need to provide to get my BABYLON.Camera Sub-Class to work ???

Thanks as always :slight_smile:

https://doc.babylonjs.com/how_to/customizing_camera_inputs
This may be helpful to you, then you need to carefully read the source code to implement a camera controller of your own.