// look up rate
void AClashOfBallsBall::LookUpAtRate(float Rate)
{
	//UE_LOG(LogTemp, Warning, TEXT("LookUp/Down"));
	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
void ARoguelikeChar::CharacterMouseLookUpDown(float AxisValue)
{
	if (bIsDead)return;
	if (FMath::Abs(AxisValue) > 0.005f)
	{

		float Amt = AxisValue * TurningSpeed * GetWorld()->GetDeltaSeconds();

		if (AxisValue > 0)
		{
			if (PlayerSpringArm->GetComponentRotation().Pitch + Amt <= -ClampingAngle)
				return;
			else
			{
				AddControllerPitchInput(Amt);
			}
		}
		else if (AxisValue < 0)
		{
			if (PlayerSpringArm->GetComponentRotation().Pitch + Amt >= ClampingAngle)
				return;
			else
			{
				AddControllerPitchInput(Amt);
			}
		}



	}

}
void AOrionSpectatorPawn::LookUpAtRate(float Rate)
{
	AOrionPlayerController *PC = Cast<AOrionPlayerController>(Controller);

	if (PC)
	{
		if (PC->bThirdPersonCamera)
			AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
		else if (PC->bDaveyCam)
		{
			// calculate delta for this frame from the rate information
			AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
		}
	}
}
void APlayerCharacter::LookUpAtRate(float Rate)
{

	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds()); //pitch vertical rotation

}
void AFP_FirstPersonCharacter::TouchUpdate(const ETouchIndex::Type FingerIndex, const FVector Location)
{
	// If we are processing a touch event and this index matches the initial touch event process movement
	if ((TouchItem.bIsPressed == true) && (TouchItem.FingerIndex == FingerIndex))
	{
		if (GetWorld() != nullptr)
		{
			UGameViewportClient* ViewportClient = GetWorld()->GetGameViewport();
			if (ViewportClient != nullptr)
			{
				FVector MoveDelta = Location - TouchItem.Location;
				FVector2D ScreenSize;
				ViewportClient->GetViewportSize(ScreenSize);
				FVector2D ScaledDelta = FVector2D(MoveDelta.X, MoveDelta.Y) / ScreenSize;
				if (ScaledDelta.X != 0.0f)
				{
					TouchItem.bMoved = true;
					float Value = ScaledDelta.X * BaseTurnRate;
					AddControllerYawInput(Value);
				}
				if (ScaledDelta.Y != 0.0f)
				{
					TouchItem.bMoved = true;
					float Value = ScaledDelta.Y* BaseTurnRate;
					AddControllerPitchInput(Value);
				}
				TouchItem.Location = Location;
			}
			TouchItem.Location = Location;
		}
	}
}
예제 #6
0
void APlayerCharacter::MoveMouseY(float val)
{
	if (val != 0.0f)
	{
		AddControllerPitchInput(val);
	}
}
예제 #7
0
/*Description: Controls the camera pitch*/
void APoseidonCharacter::CameraPitch(float value)
{
	if (!mWasGrappleShot && !mCameraLock)
	{
		AddControllerPitchInput(value * LookUpBaseRate * GetWorld()->GetDeltaSeconds());
	}
}
void AMobileOpenCVCharacter::TouchUpdate(const ETouchIndex::Type FingerIndex, const FVector Location)
{
	if ((TouchItem.bIsPressed == true) && ( TouchItem.FingerIndex==FingerIndex))
	{
		if (TouchItem.bIsPressed)
		{
			if (GetWorld() != nullptr)
			{
				UGameViewportClient* ViewportClient = GetWorld()->GetGameViewport();
				if (ViewportClient != nullptr)
				{
					FVector MoveDelta = Location - TouchItem.Location;
					FVector2D ScreenSize;
					ViewportClient->GetViewportSize(ScreenSize);
					FVector2D ScaledDelta = FVector2D( MoveDelta.X, MoveDelta.Y) / ScreenSize;									
					if (ScaledDelta.X != 0.0f)
					{
						TouchItem.bMoved = true;
						float Value = ScaledDelta.X * BaseTurnRate;
						AddControllerYawInput(Value);
					}
					if (ScaledDelta.Y != 0.0f)
					{
						TouchItem.bMoved = true;
						float Value = ScaledDelta.Y* BaseTurnRate;
						AddControllerPitchInput(Value);
					}
					TouchItem.Location = Location;
				}
				TouchItem.Location = Location;
			}
		}
	}
}
void AMMO_Character::TurnUp(float AxisValue)
{
	if (LockedTarget)return;
	if (bMantineeHasControl)return;

	if (FMath::Abs(AxisValue) > 0.05f)
	{
		AddControllerPitchInput(AxisValue* TurningSpeed);
	}
}
예제 #10
0
void AAvatar::Pitch(float amount)
{
  if (inventory_showing) {
    APlayerController* p_controller = GetWorld()->GetFirstPlayerController();
    ANPC_HUD* hud = Cast<ANPC_HUD>(p_controller->GetHUD());
    hud->MouseMoved();
    return;
  } else {
    AddControllerPitchInput(200.f * amount * GetWorld()->GetDeltaSeconds());
  }
}
예제 #11
0
void ASECharacter::LookUp(float Val)
{
   if (State != ECharacterState::Idle || ZoomState != ECharacterZoomState::None)
      return;

   auto PS = CastChecked<ASECharacterState>(PlayerState);
   if (!PS) return;

   if (PS->CursorState == ECharacterCursorState::Locked)
      AddControllerPitchInput(Val);
}
예제 #12
0
void AAvatar::Pitch( float amount )
{
	//y
	if( inventoryShowing )
	{
		// if the button is down click drag
		APlayerController* PController = GetWorld()->GetFirstPlayerController();
		AMyHUD* hud = Cast<AMyHUD>( PController->GetHUD() );
		hud->MouseMoved();
	}
	//else
	{
		AddControllerPitchInput(200.f*amount * GetWorld()->GetDeltaSeconds());
	}
}
예제 #13
0
//Mouse look
void AMyCharacter::LookUp(float Val)
{
	AddControllerPitchInput(Val);
}
예제 #14
0
void AAvatar::Pitch(float amount)
{
    if (!hasWon && !hasLost){
        AddControllerPitchInput(-200.f * amount * GetWorld()->GetDeltaSeconds());
    }
}
예제 #15
0
void AAvatar::Pitch(float amount)
{
	AddControllerPitchInput(100.f*amount*GetWorld()->GetDeltaSeconds());
}
예제 #16
0
void ANimModCharacter::LookUpAtRate(float Val)
{
	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Val * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
void AWeaponEssentialsCharacter::LookUpAtRate(float Rate)
{
	// Calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
void APlayerCharacter::VerticalMovement(float Value) {
    AddControllerPitchInput(Value * mouseSensitivity * GetWorld()->GetDeltaSeconds());
}
void ABatteryCollectorCharacter::LookUpAtRate(float Rate)
{
	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
void ARewindableReplayDemoCharacter::LookUpAtRate(float Rate)
{
	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
void APlayableCharacter::LookUp(float Step)
{
	AddControllerPitchInput(Step);
}
예제 #22
0
/**
 * Called via input to turn look up/down at a given rate.
 * @param Rate	This is a normalized rate, i.e. 1.0 means 100% of desired turn rate
 */
void AMutagenPlayer::LookUpAtRate(float Rate)
{
	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
예제 #23
0
void ADefaultPawn::LookUpAtRate(float Rate)
{
	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds() * CustomTimeDilation);
}
예제 #24
0
void AKIMCharacter::LookUp(float Value) {
	AddControllerPitchInput(Value * BaseLookRate * GetWorld()->GetDeltaSeconds());
}