标签:
#include "Runtime/Engine/Classes/Kismet/KismetMathLibrary.h" //省略大部分代码 void AMyFPS_Character::OnMoveingOrRot() { GetActorLocation(); //LineTraceSingle_NEW(); if (GEngine != nullptr) { FHitResult hit; auto temp_startPos = GetActorLocation(); auto temp_rota = GetActorRotation(); auto temp_endPos = FRotationMatrix(temp_rota).GetScaledAxis(EAxis::X) * 500.0f; // + //hit. m_bodyInstance.LineTrace(hit, temp_startPos, temp_endPos, false, false); if (hit.Actor != nullptr && hit.Actor != this) { m_operaTarget = hit.Actor; } } }
标签:
原文地址:http://www.cnblogs.com/linqing/p/5029914.html