Download

Few problems in Unreal engine 4

Hello, I’m new to unreal engine and i’ve been learning for the past few weeks how to program with it. I have encountered a few problems though and if anyone could answer me it would be greatly appreciated.

  1. The first problem i`ve encountered is that once I successfully compiled through Visual Studio, I always get a new window of Unreal Engine. I wonder if its possible to just to have one open and not have new windows popping out everytime I compile?
    (I have tried opening VS through my Unreal Engine it doesn’t work apparently.)

  2. I’m now working on my Character Controller . However it would seem that My Pitch, pitches my whole capsule. (I’m working with the animation startup kit). i wonder if its possible to just Pitch the head, otherwise it gets really twisted …


AAvatar::AAvatar()
{
 	// Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

}

// Called when the game starts or when spawned
void AAvatar::BeginPlay()
{
	Super::BeginPlay();
	
}

// Called every frame
void AAvatar::Tick( float DeltaTime )
{
	Super::Tick( DeltaTime );

}




void AAvatar::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
	check(InputComponent);
	InputComponent->BindAxis("Forward", this, &AAvatar::MoveForward);
	InputComponent->BindAxis("Strafe", this, &AAvatar::MoveRight);
	InputComponent->BindAxis("Yaw", this, &AAvatar::Yaw);
	InputComponent->BindAxis("Pitch", this, &AAvatar::Pitch);
}

void AAvatar::MoveForward(float amount)
{
	if (Controller && amount)
	{
		FVector forward = GetActorForwardVector();
		AddMovementInput(forward, amount);
	}
}

void AAvatar::MoveRight(float amount)
{
	if (Controller && amount)
	{
		FVector right = GetActorRightVector();
		AddMovementInput(right, amount);
	}
}

/*void AAvatar::MoveBackward(float amount)
{
	if (Controller && amount)
	{
		FVector back = -GetActorForwardVector();
		AddMovementInput(back, amount);
	}
}
void AAvatar::MoveLeft(float amount)
{
	if (Controller && amount)
	{
		FVector left = -GetActorRightVector();
		AddMovementInput(left, amount);
	}
}*/

void AAvatar::Yaw(float amount)
{
	AddControllerYawInput(200.f * amount* GetWorld()->GetDeltaSeconds());
}

 void AAvatar::Pitch(float amount)
{
	AddControllerPitchInput(200.f * amount * GetWorld()->GetDeltaSeconds());
} 


(here’s my script)

Hi Blaze354,

I’ve moved your thread to the C++ section as it is the best forum section for this specific question.