rdeioris / glTFRuntime-docs

Official Documentation for the glTFRuntime Unreal Engine Plugin
MIT License
97 stars 16 forks source link

Request Support Runtime load camera #1

Closed fingerx closed 3 years ago

fingerx commented 3 years ago

thanks for work,can your add support runtime load camera from gltf?thanks

rdeioris commented 3 years ago

Hi @fingerx camera support has been added in master branch.

There are currently 4 functions exposed:

TArray<FString> GetCamerasNames();
ACameraActor* LoadNodeCamera(UObject* WorldContextObject, const int32 NodeIndex, TSubclassOf<ACameraActor> CameraActorClass);
TArray<int32> GetCameraNodesIndices();
bool LoadCamera(const int32 CameraIndex, UCameraComponent* CameraComponent);

If You use the included AssetActor it will load the cameras automatically (included animations, just assign the current view target to one of them, if you are in editor just 'eject' and click over the camera component you want to inspect)

fingerx commented 3 years ago

@rdeioris thanks