x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Hi,

I've just been playing around with the FPS blueprint and prevented projectiles to disappear after hitting an object. My question is: how do I make the 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).

Product Version: Not Selected
Tags:
more ▼

asked May 08 '14 at 07:16 PM in Using UE4

avatar image

Bproof
60 12 12 91

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hey Bproof,

First, make sure they don't disappear after a few seconds. In the 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 the projectiles physics actors. In the Components tab, select the [ROOT] CollisionComponent and scroll down to the Collision settings in the Details panel. For Collision Presets, choose PhysicsActor.

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

Hope that helps!

Ben Halliday

more ▼

answered May 08 '14 at 09:10 PM

avatar image Bproof May 08 '14 at 09:44 PM

That fixed it, thanks :)

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

avatar image Bproof May 08 '14 at 09:49 PM

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

avatar image iju Aug 01 '14 at 07:57 AM

I know this is old, but I figured I'd reply in case anyone else comes across this question... To fix the projectiles going through the ground you can turn on the CollisionComponent's "Use CCD" . To get the blueprint (sort of) working turn on "Simulation Generates Hit Events". I say "sort of" because the 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 the CollisionComponent's "Mass Scale".

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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
more ▼

answered May 12 '14 at 12:39 PM

avatar image

envenger
383 62 99 133

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question