UE5中物体(instancemesh)沿样条线(spline)循环移动

发布时间:2024年01月16日

 

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Components/SplineComponent.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "MeshMovingOnSplineClass.generated.h"

/**
 * 
 */
UCLASS()
class TCPCONNENT_API UMeshMovingOnSplineClass : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
	UFUNCTION(BlueprintCallable)
	static void MeshOnSplineMoving(int32 MeshCount,UInstancedStaticMeshComponent* InstancedStaticMesh,USplineComponent* spline,float Speed = 1);

	static FTransform SpawnTransform;
	static float InitSpeed;
	static FVector SplineVector;
	static FRotator SplineRotator;
	static FVector SplineScale;
	static FTransform UpdateTransform;
	
};
// Fill 
文章来源:https://blog.csdn.net/weixin_42318094/article/details/135632585
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。