• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AddControllerPitchInput函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中AddControllerPitchInput函数的典型用法代码示例。如果您正苦于以下问题:C++ AddControllerPitchInput函数的具体用法?C++ AddControllerPitchInput怎么用?C++ AddControllerPitchInput使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了AddControllerPitchInput函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: AddControllerPitchInput

// 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());
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:7,代码来源:ClashOfBallsBall.cpp


示例17: AddControllerPitchInput

void ARewindableReplayDemoCharacter::LookUpAtRate(float Rate)
{
	// calculate delta for this frame from the rate information
	AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
开发者ID:jlucka625,项目名称:Rewindable-Replay-System,代码行数:5,代码来源:RewindableReplayDemoCharacter.cpp


示例18: AddControllerPitchInput

/**
 * 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());
}
开发者ID:belven,项目名称:Mutagen,代码行数:9,代码来源:MutagenPlayer.cpp


示例19: AddControllerPitchInput

void AAvatar::Pitch(float amount)
{
    if (!hasWon && !hasLost){
        AddControllerPitchInput(-200.f * amount * GetWorld()->GetDeltaSeconds());
    }
}
开发者ID:nzayatz14,项目名称:MazeGameEnhanced,代码行数:6,代码来源:Avatar.cpp


示例20: AddControllerPitchInput

void APlayerCharacter::VerticalMovement(float Value) {
    AddControllerPitchInput(Value * mouseSensitivity * GetWorld()->GetDeltaSeconds());
}
开发者ID:TriFuse-Infrared,项目名称:Oncoming-Pre-Alpha,代码行数:3,代码来源:PlayerCharacter.cpp



注:本文中的AddControllerPitchInput函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AddCreature函数代码示例发布时间:2022-05-30
下一篇:
C++ AddComponent函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap