I am spawning a “APhysicsConstraintActor” just fine. It spawns in with the name PhysicsConstraintActor-1, even though I am explicitly assigning it a custom name through the spawn params in the function call.
APhysicsConstraintActor* ATheCharacter::SpawnPhysicsConstraint()
{
FVector CameraLoc;
FRotator CameraRot;
FVector pos;
FVector offset;
GetActorEyesViewPoint(CameraLoc, CameraRot);
offset.Set(150.0f, 150.0f, 150.0f);
pos = CameraLoc + (CameraRot.Vector() * offset);
FActorSpawnParameters SpawnParams;
SpawnParams.Owner = this;
SpawnParams.Instigator = Instigator;
SpawnParams.Name = "myConstraint";
APhysicsConstraintActor* myConstraint = (APhysicsConstraintActor*)GetWorld()->SpawnActor(APhysicsConstraintActor::StaticClass(), &CameraLoc, &CameraRot, SpawnParams);
return myConstraint;
}
Any ideas as to why it’s assigning it a default name, instead of the actual custom name I am attempting to assign it to?
Thanks guys!