I want these properties:
under a custom c++ node without inheriting from the Class Camera in my CustomCharacterClass, which would make my CustomCharacterNode a Camera as well, but instead make a c++ object of Class Camera like-> Camera CharacterCamera;
. Is there a way to expose this c++ object of class Camera and its properties to the inspector?
I don't really have anything in them yet, but here is my current code for the header file:
#ifndef CHARACTERFPS_H
#define CHARACTERFPS_H
#include "scene/3d/visual_instance.h"
#include "scene/3d/camera.h"
#include "scene/3d/mesh_instance.h"
class CharacterFPS : public Spatial{
OBJ_TYPE(CharacterFPS, Spatial)
protected:
static void _bind_methods();
public:
friend class Camera;
Camera *FPS_Camera;
MeshInstance *CharacterMesh;
CharacterFPS();
~CharacterFPS();
private:
};
#endif
and my corresponding cpp file:
#include "CharacterFPS.h"
void CharacterFPS::_bind_methods() {
}
CharacterFPS::CharacterFPS() {
}
CharacterFPS::~CharacterFPS() {
CharacterMesh->~MeshInstance();
FPS_Camera->~Camera();
}
I plan to put everything I would need for future fps games in this custom node, so I don't have to copy and re-edit everything from project to project.