First of all thanks for the amazing course, the course and the instructors are amazing!
So as shown in the screenshots, my first problem is the Projectile which spawns infront of the TurretMesh, when I fire it it doesn’t move forward, it stays where it spawned and drops on the ground.
My second problem is the Camera and the Camera Spring, So for some reason when I created the Camera Component when it was in it’s normal position(Behind the Tank), when I started the game the camera wasn’t behind the tank, it was way far on the right, so to fix it I had to move it in BP like in the screen shot…
Here is the Screenshots:
Here is some sections of the code which includes the Camera and the SpringArm:
PawnTank.h :
private:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components", meta = (AllowPrivateAccess = "true"))
USpringArmComponent *SpringArm;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components", meta = (AllowPrivateAccess = "true"))
UCameraComponent *Camera;
PawnTank.cpp:
APawnTank::APawnTank()
{
SpringArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("Spring Arm"));
SpringArm->SetupAttachment(RootComponent);
Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
Camera->SetupAttachment(SpringArm);
}
I don’t know which code should I include for the Projectile Problem, but if know something about it you can ask me to include any sections of the codes here in the comments,
Thanks in advance!