UE4 Cesium for unreal piecemeal study notes

 

1. The prerequisite for moving the corresponding target to the corresponding latitude and longitude altitude is to add a UCesiumGlobeAnchorComponent component first. The MoveToLongitudeLatitudeHeight function is encapsulated in the component, which is used to set the owner of the component to the corresponding latitude and longitude height.

2. Problem: Due to the loss of latitude and longitude accuracy, the distance to be moved will be greatly deviated, so try to use glm::dvec3 to pass parameters. glm::dvec3 is the full name of double vector, which means double-precision vector, so that the problem of data accuracy can be solved.

3. glm is the matrix operation of OPENGL, so you need to add the header file

#include <glm/vec3.hpp>

MeshAnchor->SetRelativeRotation({ pitch, yaw - 90, roll});
UPROPERTY(EditAnywhere,BlueprintReadWrite)
		USceneComponent* MeshAnchor;

This sets the pitch and roll angles


For each additional level, divide it by 2. If you want to put other higher-precision PNGs in, then the xml needs to do the aforementioned operations 

If the cut out picture is jpg, you need to modify the selected content of the upper picture box on the xml to jpg

Guess you like

Origin blog.csdn.net/qqQQqsadfj/article/details/131852657