# Why is my GPU not working at 100%?

**URL:** <https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381>\
**Category:** Getting Started & Setup\
**Tags:** unreal-engine, question\
**Created:** [October 19, 2024, 10:40pm UTC](https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381 "2024-10-19T22:40:23Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 29, 2024, 4:57pm UTC](https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381/21 "2024-10-29T16:57:22Z")

</div>

The spin is a bit cosmetic just because it looks pretty)… it’s like the idle animation.

Weapons don’t have textures… they just have materials (two or three)

I’m going to watch the video.  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [October 29, 2024, 5:00pm UTC](https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381/22 "2024-10-29T17:00:07Z")

</div>

if you want performance then look into object pooling for your ammunition. It will give you a much bigger gain than the spinning weapons.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 29, 2024, 5:02pm UTC](https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381/23 "2024-10-29T17:02:41Z")

</div>

Ok, I’ll look into that.  
Thank you!!!.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [November 7, 2024, 5:34am UTC](https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381/24 "2024-11-07T05:34:43Z")

</div>

Hi @3dRaven  
I made the pool.

On one hand it’s great, all the effects are pre-loaded into memory and there’s no lag at the start.

But on the other hand it doesn’t help with the FPS.  
I will generate 20 projectiles per weapon. (10x20 = 200).  
So I have 200 new replicated actors at level.

Well look at this.  
They are causing 3.2ms of CPU time just for replication.  
And they are completely disabled (no movement, no collisions, hidden)… as if they didn’t exist… but replication consumes CPU anyway.

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/2/6522749956b8fa3238ea247d5fbc17d8222cefa4.png)

Even if I disable replication when not using them the problem persists.

```auto
//-----------------------------------------------------------------------------
void AAmmoBase::Enable()
{	
	if (HasAuthority())
	{
		bReplicates=true;
		SetReplicateMovement(true);		
	}
}
//-----------------------------------------------------------------------------
void AAmmoBase::Disable()
{
	if (HasAuthority())
	{
		bReplicates=false;
		SetReplicateMovement(false);		
	}	
}
//-----------------------------------------------------------------------------

```

It looks a little better but it persists.

 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/9/a/49a211b6acffc130902ae4b09e886c3faf2b7eae.png)

Any tips to improve this?

Thank you so much!!

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [November 7, 2024, 9:18am UTC](https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381/25 "2024-11-07T09:18:34Z")

</div>

In the enable / disable you should turn off rendering (set hidden) and set collisions to none. Deactivate projectile movement component too (set vel to 0, deactivate) .

On enable turn off hidden in game, reenable collisions and set the pmc update component (preferrably a collision component) and activate it to re-run the pmc.

Do you have an audio component on the projectile? If its just for impact sounds then better just fire off a oneshot sound at location.

Turned off items in the pool should just consume memory (zero calculations)

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [November 7, 2024, 9:33am UTC](https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381/26 "2024-11-07T09:33:34Z")

</div>

I did it  
Sorry, I only showed you the replication part. (I attached all code at the end)

> [@3dRaven](#):
>
> Do you have an audio component on the projectile? If its just for impact sounds then better just fire off a oneshot sound at location.

I made a pool for sounds and a particle system as well (everything is reused).

> [@3dRaven](#):
>
> Turned off items in the pool should just consume memory (zero calculations)

Yes, they do absolutely nothing.  
I made a subsystem to simulate the shots. Just place the projectile on the muzzle of the weapon. and then returns it to the pool.

All I do is enable and disable things.

There must be something I haven’t disabled, I think it’s something related to replication (NetBroadcastTicktime) but I’m not sure.

```auto

//-----------------------------------------------------------------------------
// 
//-----------------------------------------------------------------------------
void AProjectile::Disable()
{
	AAmmoBase::Disable();

	if(!IsValid(Movement))
	{
		Message::Error("AProjectile::Disable --> Movement is NULL" );
		return;
	}
	Movement->ProjectileGravityScale = 0.0f;
	Movement->Velocity = FVector(0.0f, 0.0f, 0.0f);
	Movement->Deactivate();
	Movement->bAutoActivate=false;

	if(!IsValid(NiagaraTrail))
	{
		Message::Error("AProjectile::Disable --> NiagaraTrail is NULL" );
		return;
	}	
	NiagaraTrail->Disable();	
	NiagaraTrail->Deactivate();
	NiagaraTrail->bAutoActivate=false;
	

	if(!IsValid(NiagaraProjectile))
	{
		Message::Error("AProjectile::Disable --> NiagaraProjectile is NULL" );
		return;
	}
	NiagaraProjectile->Hide();
	NiagaraProjectile->Disable();
	NiagaraProjectile->Deactivate();
	NiagaraProjectile->bAutoActivate=false;
	

	
	if(!IsValid(HitNiagara_Explotion))
	{
		Message::Error("AProjectile::Disable --> HitNiagara_Explotion is NULL" );
		return;
	}	
	//HitNiagara_Explotion->Disable();
	HitNiagara_Explotion->Deactivate();
	HitNiagara_Explotion->bAutoActivate=false;
	

	if(!IsValid(AudioShooting))
	{		
		Message::Error("AProjectile::Disable --> AudioShooting is NULL" );
		return;		
	}
	AudioShooting->InitPooling();
	AudioShooting->Deactivate();
	AudioShooting->bAutoActivate=false;

	if(!IsValid(Hit_Audio))
	{
		Message::Error("AProjectile::Disable --> Hit_Audio is NULL" );
		return;			
	}
	//Hit_Audio->InitPooling();
	Hit_Audio->Deactivate();
	Hit_Audio->bAutoActivate=false;
	
	if(!IsValid(Damage_Component))
	{
		Message::Error("AProjectile::Disable --> Damage_Component is NULL" );
		return;			
	}
	Damage_Component->Deactivate();
	Damage_Component->bAutoActivate=false;

	if (!IsValid(SphereCollider))
	{
		Message::Error("Projectile::Disable --> SphereMesh is NULL");
		return;				
	}
	SphereCollider->SetNotifyRigidBodyCollision(false);
	SphereCollider->SetGenerateOverlapEvents(false);
	SphereCollider->SetCollisionEnabled( ECollisionEnabled::Type::NoCollision);
	SphereCollider->Deactivate();

	if (!IsValid(SphereMesh))
	{
		Message::Error("Projectile::Disable --> SphereMesh is NULL");
		return;				
	}		
	SphereMesh->SetVisibility(false, false);
	SphereMesh->Deactivate();

}
//-----------------------------------------------------------------------------
// 
//-----------------------------------------------------------------------------
void AProjectile::Enable()
{

	AAmmoBase::Enable();

	
	if(!IsValid(Movement))
	{
		Message::Error("AProjectile::Enable --> Movement is NULL" );
		return;
	}
	//Movement->InitialSpeed = 3000.0f;
	//Movement->MaxSpeed = 3000.0f;
	Movement->ProjectileGravityScale = GravityScale;
	Movement->Activate();
	
	

	if(!IsValid(NiagaraTrail))
	{
		Message::Error("AProjectile::Enable --> NiagaraTrail is NULL" );
		return;
	}
	NiagaraTrail->Enable();
	NiagaraTrail->Activate();
	

	if(!IsValid(NiagaraProjectile))
	{
		Message::Error("AProjectile::Enable --> NiagaraProjectile is NULL" );
		return;
	}
	NiagaraProjectile->Show();
	NiagaraProjectile->Enable();
	NiagaraProjectile->Activate();

	
	if(!IsValid(HitNiagara_Explotion))
	{
		Message::Error("AProjectile::Enable --> HitNiagara_Explotion is NULL" );
		return;
	}
	HitNiagara_Explotion->Activate();
	
	

	if(!IsValid(AudioShooting))
	{		
		Message::Error("AProjectile::Enable --> AudioShooting is NULL" );
		return;		
	}	
	AudioShooting->Activate();
	AudioShooting->Play();

	if(!IsValid(Hit_Audio))
	{
		Message::Error("AProjectile::Enable --> Hit_Audio is NULL" );
		return;			
	}
	Hit_Audio->Activate();
	//Hit_Audio->Play();

	if(!IsValid(Damage_Component))
	{
		Message::Error("AProjectile::Enable --> Damage_Component is NULL" );
		return;			
	}
	Damage_Component->Activate();

	if (!IsValid(SphereCollider))
	{
		Message::Error("AProjectile::Enable --> SphereMesh is NULL");
		return;				
	}
	SphereCollider->SetNotifyRigidBodyCollision(true);
	SphereCollider->SetGenerateOverlapEvents(true);
	SphereCollider->SetCollisionEnabled( ECollisionEnabled::Type::QueryAndPhysics);
	SphereCollider->Activate();

	if (!IsValid(SphereMesh))
	{
		Message::Error("AProjectile::Enable --> SphereMesh is NULL");
		return;				
	}		
	SphereMesh->SetVisibility(true, false);
	SphereMesh->Activate();
}

```

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [November 7, 2024, 10:40am UTC](https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381/27 "2024-11-07T10:40:05Z")

</div>

I don’t see that the actors are sending data.  
Not even all the actors (ammunition) that are in the level were listed.

NetBroadcastTicktime It must be something else that is not related to the network.

 ![3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/a/57a3f3420b6787d41da8e0a2b2e10bc4226edc24.png)

Do you know what it is?

[Previous page](https://forums.unrealengine.com/t/why-is-my-gpu-not-working-at-100/2076381.md?page=1)
