How do I make my projectiles movable after they've stopped?

Hi,

I’ve just been playing around with FPS blueprint and prevented projectiles to disappear after hitting an object. My question is: how do I make orange balls movable after they’ve stopped bouncing around? They’re completely static and I can’t move them by shooting or pushing (my character get’s stuck).

Hey Bproof,

First, make sure they don’t disappear after a few seconds. In MyProjectile Blueprint’s Defaults tab, change Initial Life Span to a larger number, or to 0.0 if you want them to stay forever.

Next, you’ll want to make projectiles physics actors. In Components tab, select [ROOT] CollisionComponent and scroll down to Collision settings in Details panel. For Collision Presets, choose PhysicsActor.

Lastly, make sure that Simulate Physics is enabled in Physics settings.

Hope that helps!

That fixed it, thanks :slight_smile:

I have one more quick question: is there a way to make projectile slow down a little quicker? It seems to be rolling forever.

And one more thing: now I’m not able to move big boxes by shooting them. smaller ones are movable, probably because they’re lighter. That wasn’t an issue before. Modifying ,Add impulse at location" parameteres doesn’t change anything (it did before and it was great fun :slight_smile: ). projectiles also randomly fly right through ground. Any way to fix this?

You projectiles are not moving objects cause they are not overlapping anymore. Instead they are hitting it.

.h

UFUNCTION()
void OnHit(class AActor* OtherActor, class UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);

.cpp

CollisionComp->OnComponentHit.AddDynamic(this, &AMyProjectProjectile::OnHit);


void AMyProjectProjectile::OnHit(AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
{
	//GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("HIT"));
	if (OtherActor && (OtherActor != this) && OtherComp)
	{
		OtherComp->AddImpulseAtLocation(ProjectileMovement->Velocity * 200.0f, Hit.ImpactPoint);
	}
}enter code here

I know this is old, but I figured I’d reply in case anyone else comes across this question… To fix projectiles going through ground you can turn on CollisionComponent’s “Use CCD” . To get blueprint (sort of) working turn on “Simulation Generates Hit Events”. I say “sort of” because impulse doesn’t work right… it’s wonky and I gave up on trying to figure it out. For a similar effect you can instead increase CollisionComponent’s “Mass Scale”.