Casting an Actor class without spawning

I was curious on how to cast a custom actor class? I can do with with characters, but not with actor classes. any Idea how to do this?

void AMyCustomCharacter::OnCollision(class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
{
	if ((OtherActor != NULL) && (OtherActor != this) && (OtherComp != NULL))
	{
		GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Red, TEXT("I HIT THAT"));
		AItem *Item = //NEED HELP HERE!!!-----------------------------------------------------------------------------
		if (OtherActor == Item)
		{
			GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Red, TEXT("ITEM"));
			bCanPickUp = true;
		}
		else
		{
			bCanPickUp = false;
		}
	}
}

I have the first collision check working, just need to know how to cast the AWeapon actor :(.

It’s totally not clear what you really want to cast to what type…

If you need AItem pointer, cast your OtherActor to AItem; if you need AWeapon pointer, replace AItem with AWeapon at the line 6 and cast to AWeapon.

AItem* Item = Cast<AItem>(OtherActor);

or

AWeapon* Weapon = Cast<AWeapon>(OtherActor);

That’s exactly what I needed :)!! Thank you for your clarification!! sorry for my unclarity what I wanted Dx.