當前位置: 首頁>>代碼示例>>C++>>正文


C++ AddControllerPitchInput函數代碼示例

本文整理匯總了C++中AddControllerPitchInput函數的典型用法代碼示例。如果您正苦於以下問題:C++ AddControllerPitchInput函數的具體用法?C++ AddControllerPitchInput怎麽用?C++ AddControllerPitchInput使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AddControllerPitchInput函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: GetWorld

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);
			}
		}



	}

}
開發者ID:DigitalDok,項目名稱:MyPortfolioSnippets,代碼行數:32,代碼來源:RoguelikeChar.cpp

示例2: AddControllerPitchInput

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());
		}
	}
}
開發者ID:xGundyx,項目名稱:GuardiansOfOrion,代碼行數:15,代碼來源:OrionSpectatorPawn.cpp

示例3: GetWorld

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;
		}
	}
}
開發者ID:colwalder,項目名稱:unrealengine,代碼行數:32,代碼來源:FP_FirstPersonCharacter.cpp

示例4: AddControllerPitchInput

void APlayerCharacter::MoveMouseY(float val)
{
	if (val != 0.0f)
	{
		AddControllerPitchInput(val);
	}
}
開發者ID:Zyrst,項目名稱:Run,代碼行數:7,代碼來源:PlayerCharacter.cpp

示例5: AddControllerPitchInput

void APlayerCharacter::LookUpAtRate(float Rate)
{

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

}
開發者ID:Snowman5717,項目名稱:SymphonyOfShadows,代碼行數:7,代碼來源:PlayerCharacter.cpp

示例6: GetWorld

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;
			}
		}
	}
}
開發者ID:brucelane,項目名稱:UEMobileOpenCV,代碼行數:34,代碼來源:MobileOpenCVCharacter.cpp

示例7: AddControllerPitchInput

/*Description: Controls the camera pitch*/
void APoseidonCharacter::CameraPitch(float value)
{
	if (!mWasGrappleShot && !mCameraLock)
	{
		AddControllerPitchInput(value * LookUpBaseRate * GetWorld()->GetDeltaSeconds());
	}
}
開發者ID:AndreaOsorio,項目名稱:PSI,代碼行數:8,代碼來源:PoseidonCharacter.cpp

示例8: AddControllerPitchInput

void AMMO_Character::TurnUp(float AxisValue)
{
	if (LockedTarget)return;
	if (bMantineeHasControl)return;

	if (FMath::Abs(AxisValue) > 0.05f)
	{
		AddControllerPitchInput(AxisValue* TurningSpeed);
	}
}
開發者ID:DigitalDok,項目名稱:MyPortfolioSnippets,代碼行數:10,代碼來源:MMO_Character.cpp

示例9: GetWorld

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());
  }
}
開發者ID:mdurn,項目名稱:UnrealSample,代碼行數:11,代碼來源:Avatar.cpp

示例10: AddControllerPitchInput

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);
}
開發者ID:starryexpanse,項目名稱:StarryExpanse,代碼行數:11,代碼來源:SECharacter.cpp

示例11: GetWorld

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());
	}
}
開發者ID:phillzz,項目名稱:GoldenEgg,代碼行數:15,代碼來源:Avatar.cpp

示例12: AddControllerPitchInput

void AAvatar::Pitch(float amount)
{
	AddControllerPitchInput(100.f*amount*GetWorld()->GetDeltaSeconds());
}
開發者ID:fredster1777,項目名稱:maze,代碼行數:4,代碼來源:Avatar.cpp

示例13: AddControllerPitchInput

void ANimModCharacter::LookUpAtRate(float Val)
{
	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Val * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
開發者ID:Nimgoble,項目名稱:NimMod,代碼行數:5,代碼來源:NimModCharacter.cpp

示例14: AddControllerPitchInput

void AWeaponEssentialsCharacter::LookUpAtRate(float Rate)
{
	// Calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
開發者ID:CHADALAK1,項目名稱:WeaponEssentials4.6,代碼行數:5,代碼來源:WeaponEssentialsCharacter.cpp

示例15: AddControllerPitchInput

void ABatteryCollectorCharacter::LookUpAtRate(float Rate)
{
	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
開發者ID:DrunkReaperMatt,項目名稱:BatteryCollector,代碼行數:5,代碼來源:BatteryCollectorCharacter.cpp


注:本文中的AddControllerPitchInput函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。