CHATGPT AI
pragma
once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "PlayerCharacter.generated.h"
UCLASS()
class CPP_PROJECT_API APlayerCharacter : public ACharacter
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class USpringArmComponent* CameraBoom;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class UCameraComponent* FollowCamera;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class UArrowComponent* Arrow;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
class UStaticMeshComponent* MeshComp;
UPROPERTY(EditDefaultsOnly)
float Speed;
UPROPERTY(EditDefaultsOnly)
float RotationSpeed;
public: // Public functions for use in blueprints and c++ code.
APlayerCharacter(); // Constructor for the class.
/** Returns CameraBoom subobject **/ // Used to get the camera boom subobject from the player character class in blueprints.
FORCEINLINE class USpringArmComponent* GetCameraBoom() const { return CameraBoom; }
/** Returns FollowCamera subobject **/ // Used to get the follow camera subobject from the player character class in blueprints.
FORCEINLINE class UCameraComponent* GetFollowCamera() const { return FollowCamera; }
/** Returns Arrow subobject **/ // Used to get the arrow subobject from the player character class in blueprints.
FORCEINLINE class UArrowComponent* GetArrow() const { return Arrow; }
/** Returns MeshComp subobject **/ // Used to get the mesh comp subobject from the player character class in blueprints.
FORCEINLINE class UStaticMeshComponent* GetMeshComp() const { return MeshComp; }
void MoveForward(float Value); // Function used to move forward and backward with a float value between -1 and 1 as input parameter.
void MoveRight(float Value); // Function used to move right and left with a float value between -1 and 1 as input parameter.
void RotateYaw(float Value); // Function used to rotate around yaw axis with a float value between -1 and 1 as input parameter.
protected: // Protected functions for use only within this base class or any derived classes of it's parent classes..
virtual void BeginPlay() override; // Override function for when play begins for this character..
virtual void Tick(float DeltaTime) override; // Override function for ticking every frame..
};
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "PlayerCharacter.generated.h"
UCLASS()
class CPP_PROJECT_API APlayerCharacter : public ACharacter
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class USpringArmComponent* CameraBoom;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class UCameraComponent* FollowCamera;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class UArrowComponent* Arrow;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
class UStaticMeshComponent* MeshComp;
UPROPERTY(EditDefaultsOnly)
float Speed;
UPROPERTY(EditDefaultsOnly)
float RotationSpeed;
public: // Public functions for use in blueprints and c++ code.
APlayerCharacter(); // Constructor for the class.
/** Returns CameraBoom subobject **/ // Used to get the camera boom subobject from the player character class in blueprints.
FORCEINLINE class USpringArmComponent* GetCameraBoom() const { return CameraBoom; }
/** Returns FollowCamera subobject **/ // Used to get the follow camera subobject from the player character class in blueprints.
FORCEINLINE class UCameraComponent* GetFollowCamera() const { return FollowCamera; }
/** Returns Arrow subobject **/ // Used to get the arrow subobject from the player character class in blueprints.
FORCEINLINE class UArrowComponent* GetArrow() const { return Arrow; }
/** Returns MeshComp subobject **/ // Used to get the mesh comp subobject from the player character class in blueprints.
FORCEINLINE class UStaticMeshComponent* GetMeshComp() const { return MeshComp; }
void MoveForward(float Value); // Function used to move forward and backward with a float value between -1 and 1 as input parameter.
void MoveRight(float Value); // Function used to move right and left with a float value between -1 and 1 as input parameter.
void RotateYaw(float Value); // Function used to rotate around yaw axis with a float value between -1 and 1 as input parameter.
protected: // Protected functions for use only within this base class or any derived classes of it's parent classes..
virtual void BeginPlay() override; // Override function for when play begins for this character..
virtual void Tick(float DeltaTime) override; // Override function for ticking every frame..
};
once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "PlayerCharacter.generated.h"
UCLASS()
class CPP_PROJECT_API APlayerCharacter : public ACharacter
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class USpringArmComponent* CameraBoom;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class UCameraComponent* FollowCamera;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class UArrowComponent* Arrow;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
class UStaticMeshComponent* MeshComp;
UPROPERTY(EditDefaultsOnly)
float Speed;
UPROPERTY(EditDefaultsOnly)
float RotationSpeed;
public: // Public functions for use in blueprints and c++ code.
APlayerCharacter(); // Constructor for the class.
/** Returns CameraBoom subobject **/ // Used to get the camera boom subobject from the player character class in blueprints.
FORCEINLINE class USpringArmComponent* GetCameraBoom() const { return CameraBoom; }
/** Returns FollowCamera subobject **/ // Used to get the follow camera subobject from the player character class in blueprints.
FORCEINLINE class UCameraComponent* GetFollowCamera() const { return FollowCamera; }
/** Returns Arrow subobject **/ // Used to get the arrow subobject from the player character class in blueprints.
FORCEINLINE class UArrowComponent* GetArrow() const { return Arrow; }
/** Returns MeshComp subobject **/ // Used to get the mesh comp subobject from the player character class in blueprints.
FORCEINLINE class UStaticMeshComponent* GetMeshComp() const { return MeshComp; }
void MoveForward(float Value); // Function used to move forward and backward with a float value between -1 and 1 as input parameter.
void MoveRight(float Value); // Function used to move right and left with a float value between -1 and 1 as input parameter.
void RotateYaw(float Value); // Function used to rotate around yaw axis with a float value between -1 and 1 as input parameter.
protected: // Protected functions for use only within this base class or any derived classes of it's parent classes..
virtual void BeginPlay() override; // Override function for when play begins for this character..
virtual void Tick(float DeltaTime) override; // Override function for ticking every frame..
};
0 Comments & Tags
0 Shares
1 Views