Enable physics on StaticMeshComponent in Throwables
This commit is contained in:
		
							parent
							
								
									62ac0e7496
								
							
						
					
					
						commit
						fe6eca55c5
					
				| @ -12,7 +12,10 @@ AThrowable::AThrowable() | |||||||
| 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
 | 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
 | ||||||
| 	PrimaryActorTick.bCanEverTick = false; | 	PrimaryActorTick.bCanEverTick = false; | ||||||
| 
 | 
 | ||||||
| 	StaticMeshComponent->SetCollisionProfileName(FName("NoCollision")); | 	StaticMeshComponent->SetCollisionProfileName(FName("PhysicsActor")); | ||||||
|  | 	StaticMeshComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); | ||||||
|  | 	StaticMeshComponent->SetSimulatePhysics(true); | ||||||
|  | 	SetRootComponent(StaticMeshComponent); | ||||||
| 
 | 
 | ||||||
| 	SphereComponent = CreateDefaultSubobject<USphereComponent>(TEXT("SphereComponent")); | 	SphereComponent = CreateDefaultSubobject<USphereComponent>(TEXT("SphereComponent")); | ||||||
| 	SphereComponent->SetSphereRadius(25.0f, true); | 	SphereComponent->SetSphereRadius(25.0f, true); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user