# Enemies become popcorn

**URL:** <https://forums.unrealengine.com/t/enemies-become-popcorn/594877>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4-26, UE4-27, CPP, question\
**Created:** [July 1, 2022, 11:43am UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877 "2022-07-01T11:43:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 1, 2022, 11:43am UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/1 "2022-07-01T11:43:32Z")

</div>

Enemies rub against each other and fly away…

what’s the problem?? sweep??

weapon is overlap all dynamic…  
not staticmesh collision

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 1, 2022, 1:09pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/2 "2022-07-01T13:09:37Z")

</div>

> [@kya7771](#):
>
> # [Enemies become popcorn](https://forums.unrealengine.com/t/enemies-become-popcorn/594877)[…]rub against each other and fly away…

+1 for the title & description. QA technican’s wet dream.

* * *

Sounds like a physics sim issue. Are you simulating? Another +1 internet point if you show the result 😇

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 1, 2022, 1:39pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/3 "2022-07-01T13:39:59Z")

</div>

no This is the default character value.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 1, 2022, 1:42pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/4 "2022-07-01T13:42:42Z")

</div>

I mean, if you do not include details, no one can help… Default characters do not eject one another into space.

_Fly away_ as if there was no gravity? I hate playing guessing games. Post details please! 😃

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 1, 2022, 1:55pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/5 "2022-07-01T13:55:32Z")

</div>

SORRY I’M KOREAN…

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/c/22c100a0f7f734c812dd6710c43499fa69bccc76.png)  
 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/3/fd34d112027a755ed6c7dd72948e182109984b5b.png)  
 ![3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/3/1f3039a9590f1476f919fbe345961518c8598224.png)  
 ![4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/e/eee98b2c0f9ee49df9311bbaa54abfb1d46e6a8d.png)  
 ![5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/2/c92040b0deb5b991de761ece2626847fda71b668.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 1, 2022, 1:58pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/6 "2022-07-01T13:58:00Z")

</div>

It’s probably not about the settings, it’s something else, most likely the script. Could you show a bit of footage of how it looks like? Or a screenshots with a description.

It’s pretty much impossible to tell what is going on in your project.

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 1, 2022, 1:59pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/7 "2022-07-01T13:59:35Z")

</div>

Are you talking about the source code?

---

<div class="post-metadata">

**Author:** ![BIGTIMEMASTER](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigtimemaster/32/710746_2.png) [@BIGTIMEMASTER](https://forums.unrealengine.com/u/BIGTIMEMASTER)\
**Post date:** [July 1, 2022, 2:00pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/8 "2022-07-01T14:00:10Z")

</div>

by default unreal is setting physics to popcorn setting.

you’ll probably want to set it to hamburger or cheese pizza in most cases.

sorry, i couldn’t resist.

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 1, 2022, 2:00pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/9 "2022-07-01T14:00:23Z")

</div>

The amount of source code is huge.

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 1, 2022, 2:03pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/10 "2022-07-01T14:03:22Z")

</div>

[http://colorscripter.com/s/0xHW0CC](http://colorscripter.com/s/0xHW0CC)  
This is Enemy sourceCode.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 1, 2022, 2:38pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/11 "2022-07-01T14:38:13Z")

</div>

> [@kya7771](#):
>
> The amount of source code is huge.

Seems pretty straightforward to me. You’re launching the character during an action. What values are you piping in? `Direction` and `Launch Value`. You’ve commented out direction normalisation, perhaps you’re feeding it a huuuge value.

Could this be it? Perhaps you could demonstrate it with a short video?

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 1, 2022, 4:24pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/12 "2022-07-01T16:24:58Z")

</div>

It’s getting late now, so I’ll post another post tomorrow afternoon.

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 2, 2022, 9:50am UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/13 "2022-07-02T09:50:15Z")

</div>

Hi I’m come back  
 ![]()

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 2, 2022, 7:47pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/14 "2022-07-02T19:47:19Z")

</div>

Haha, I take it all back - what I said about the description, it’s actually spot on.

Hard to tell for sure but to me it does look as if the characters were being launched. Can they be launching one another? This should be fairly easy to debug, no? I mean, you wrote it, right?

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 3, 2022, 10:28am UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/15 "2022-07-03T10:28:27Z")

</div>

what do you want??

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 3, 2022, 3:25pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/16 "2022-07-03T15:25:18Z")

</div>

I would like to have a look at the post above:

> [@Enemies become popcorn](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/11):
>
> Seems pretty straightforward to me. You’re launching the character during an action. What values are you piping in? Direction and Launch Value. You’ve commented out direction normalisation, perhaps you’re feeding it a huuuge value. Could this be it? Perhaps you could demonstrate it with a short video?

And see if you can answer the queries.

* * *

Is it possible the characters are trying to launch one another? What values are you piping in?

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 7, 2022, 5:10am UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/17 "2022-07-07T05:10:41Z")

</div>

I think there is a problem here.  
But this is an internal function.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/a/4/1a47ee91e78a8a9de171c0e50f88dd87ff169f36.png)

---

<div class="post-metadata">

**Author:** ![kya7771](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kya7771](https://forums.unrealengine.com/u/kya7771)\
**Post date:** [July 7, 2022, 1:02pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/18 "2022-07-07T13:02:20Z")

</div>

This is a function that is executed when the enemy is hit.  
In normal state, there is no collision with the weapon.

//FVector direction = target - start;  
[//direction.Normalize](https://direction.Normalize)();  
FVector direction = DamageInstigator-\>GetPawn()-\>GetActorForwardVector();

```
	UAnimMontage* montage;
	CHelpers::GetAssetDynamic(&montage, "AnimMontage'/Game/Character/Montages/TwoHand/Block/Frank_RPG_2Hand_Block_Montage1.Frank_RPG_2Hand_Block_Montage1'");
	//LaunchCharacter(-direction * LaunchValue, true, false);

```

this

---

<div class="post-metadata">

**Author:** ![sonictimm](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sonictimm/32/625173_2.png) [@sonictimm](https://forums.unrealengine.com/u/sonictimm)\
**Post date:** [July 7, 2022, 2:41pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/19 "2022-07-07T14:41:51Z")

</div>

I recommend you put a break point in the OnHitted function so that you know when it’s being called. Run around with the enemies and see if it’s being called when it should not be called.  
If it’s being called when you are not hitting enemies, you know something is calling it at the wrong time.

Perhaps when you launch the character in the code, you should also print a statement to the log. Print the vector that you are using to launch the character. If it has a very high Z value (vectors are X,Y,Z) , then you know the launch value is wrong for some reason.

Keep debugging and figure it out piece by piece 🙂

---

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [July 7, 2022, 2:43pm UTC](https://forums.unrealengine.com/t/enemies-become-popcorn/594877/20 "2022-07-07T14:43:32Z")

</div>

every life’s problem should become popcorn

[Next page](https://forums.unrealengine.com/t/enemies-become-popcorn/594877.md?page=2)
