|  | @@ -12,8 +12,6 @@
 | 
	
		
			
				|  |  |  #include "VRGroupBase.h"
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -static FName FirstPersonCameraName(TEXT("FirstPersonCamera"));
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  // Sets default values
 | 
	
		
			
				|  |  |  AVRCharacterBase::AVRCharacterBase(const FObjectInitializer& ObjectInitializer): Super(ObjectInitializer)
 | 
	
		
			
				|  |  |  {
 | 
	
	
		
			
				|  | @@ -26,7 +24,12 @@ AVRCharacterBase::AVRCharacterBase(const FObjectInitializer& ObjectInitializer):
 | 
	
		
			
				|  |  |  	GetMesh()->SetRelativeLocation(FVector(0, 0, -100));
 | 
	
		
			
				|  |  |  	GetMesh()->SetRelativeRotation(FRotator(0, -90, 0));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	FirstPersonCamera = CreateDefaultSubobject<UCameraComponent>(FirstPersonCameraName);
 | 
	
		
			
				|  |  | +	static ConstructorHelpers::FObjectFinder<USkeletalMesh> MeshComponentAsset(TEXT("SkeletalMesh'/Game/72/zoulu.zoulu'"));
 | 
	
		
			
				|  |  | +	if (MeshComponentAsset.Succeeded()) {
 | 
	
		
			
				|  |  | +		GetMesh()->SetSkeletalMeshAsset(MeshComponentAsset.Object);
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	FirstPersonCamera = CreateDefaultSubobject<UCameraComponent>(FName(TEXT("FirstPersonCamera")));
 | 
	
		
			
				|  |  |  	if (FirstPersonCamera) {
 | 
	
		
			
				|  |  |  		FirstPersonCamera->SetRelativeLocation(FVector(60, 0, 15));
 | 
	
		
			
				|  |  |  		FirstPersonCamera->SetupAttachment(GetCapsuleComponent());
 | 
	
	
		
			
				|  | @@ -34,19 +37,21 @@ AVRCharacterBase::AVRCharacterBase(const FObjectInitializer& ObjectInitializer):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	BeginWaitConnected_Timeline.SetTimelineLength(2);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	CurveFloat = CreateDefaultSubobject<UCurveFloat>(FName("CurveFloat"));
 | 
	
		
			
				|  |  | +	CurveFloat = CreateDefaultSubobject<UCurveFloat>(FName(TEXT("CurveFloat")));
 | 
	
		
			
				|  |  |  	if (CurveFloat) {
 | 
	
		
			
				|  |  |  		CurveFloat->FloatCurve.AddKey(0, 0);
 | 
	
		
			
				|  |  |  		CurveFloat->FloatCurve.AddKey(2, 100);
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	FOnTimelineFloatStatic onTimelineUpdate;
 | 
	
		
			
				|  |  | -	onTimelineUpdate.BindUFunction(this, FName("OnBeginWaitConnected_TimelineUpdate"));	
 | 
	
		
			
				|  |  | +	onTimelineUpdate.BindUFunction(this, FName(TEXT("OnBeginWaitConnected_TimelineUpdate")));	
 | 
	
		
			
				|  |  |  	BeginWaitConnected_Timeline.AddInterpFloat(CurveFloat, onTimelineUpdate);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	FOnTimelineEventStatic onTimelineFinished;
 | 
	
		
			
				|  |  | -	onTimelineFinished.BindUFunction(this, FName("OnBeginWaitConnected_TimelineFinished"));	
 | 
	
		
			
				|  |  | +	onTimelineFinished.BindUFunction(this, FName(TEXT("OnBeginWaitConnected_TimelineFinished")));	
 | 
	
		
			
				|  |  |  	BeginWaitConnected_Timeline.SetTimelineFinishedFunc(onTimelineFinished);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  // Called when the game starts or when spawned
 | 
	
	
		
			
				|  | @@ -111,7 +116,9 @@ void AVRCharacterBase::CreateGroup() {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	GetCapsuleComponent()->SetCollisionResponseToChannel(ECollisionChannel::ECC_Pawn, ECollisionResponse::ECR_Overlap);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	AVRGroupBase* group = GetWorld()->SpawnActor<AVRGroupBase>();
 | 
	
		
			
				|  |  | +	if (GroupClass == nullptr) GroupClass = AVRGroupBase::StaticClass();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	AVRGroupBase* group = static_cast<AVRGroupBase*>(GetWorld()->SpawnActor(GroupClass));
 | 
	
		
			
				|  |  |  	group->SetActorTransform(GetActorTransform());
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	AttachToActor(group, FAttachmentTransformRules(EAttachmentRule::SnapToTarget, EAttachmentRule::SnapToTarget, EAttachmentRule::SnapToTarget, true), NAME_None);
 |