Cody WIP before cleanup
This commit is contained in:
@@ -65,22 +65,26 @@ bool ADDICharacter::Server_SpawnProjectile_Validate()
|
||||
void ADDICharacter::Server_SpawnProjectile_Implementation()
|
||||
{
|
||||
FVector Location = GetActorLocation();
|
||||
FRotator Rotation = GetActorRotation();
|
||||
if (GetMesh()->DoesSocketExist("headSocket"))
|
||||
Location = GetMesh()->GetSocketLocation("headSocket"); //Socket_Projectile
|
||||
FRotator Rotation = GetViewRotation();
|
||||
FVector Dir = GetActorForwardVector();
|
||||
|
||||
// GetActorEyesViewPoint(Location, Rotation);
|
||||
GetActorEyesViewPoint(Location, Rotation);
|
||||
|
||||
Location += Dir * 55.f;
|
||||
Location += Dir * 155.f;
|
||||
|
||||
if (!ProjectileClass)
|
||||
{
|
||||
GEngine->AddOnScreenDebugMessage(1, 10.f, FColor::Emerald, "No Projectile Set");
|
||||
GEngine->AddOnScreenDebugMessage(2, 10.f, FColor::Emerald, "No Projectile Set");
|
||||
return;
|
||||
}
|
||||
|
||||
FActorSpawnParameters SpawnInfo;
|
||||
SpawnInfo.Owner = this;
|
||||
SpawnInfo.Instigator = GetInstigator();
|
||||
|
||||
GEngine->AddOnScreenDebugMessage(-1,10.f,FColor::Red,FString::Printf(TEXT("Server Spawning Projectile Location %f,%f,%f"), Location.X, Location.Y, Location.Z));
|
||||
GetWorld()->SpawnActor<AActor>(ProjectileClass, Location, Rotation, SpawnInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user