Hello everyone!
I am having problems with a function in my projectile class. It says that my function already has a body, which I don’t really understand. Every class starts with this function right?:
AFPSProjectile::AFPSProjectile(const class FObjectInitializer& PCIP)
: Super(PCIP)
{
}
I acctually do have a header file:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GameFramework/Actor.h"
#include "FPSProjectile.generated.h"
/**
*
*/
UCLASS()
class FPSPROJECT_API AFPSProjectile : public AActor
{
GENERATED_BODY()
public:
UPROPERTY(VisibleDefaultsOnly, Category = Projectile)
/**TSubobjectPtr<USphereComponent> CollisionComp; 4.5 method (Now deprecated) */
USphereComponent* CollisionComp;
/** Projectile movement component */
UPROPERTY(VisibleAnywhere, Category = Movement)
/**TSubobjectPtr<class UProjectileMovementComponent> ProjectileMovement; 4.5 method(Now deprecated) */
UProjectileMovementComponent* ProjectileMovement;
void InitVelocity(const FVector& ShootDirection);
};
I hope you can help me solve this problem, and explain me what I did wrong!
Thanks in advance,
NeusAap
P.S I am using engine version 4.6 preview