NPC Behavior Logic Breaks After Scaling a Custom NPC

Summary

After changing the scale of a custom NPC via “NPC Character Definition”, the behavior logic of that NPC stops working correctly.

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

AI

Steps to Reproduce

  1. Add an “NPC Spawner” to the project.
  2. Create a new “NPC Character Definition”.
  3. Create a Blueprint and add a skeletal mesh for the NPC to it.
  4. Configure the “NPC Character Definition”:

NPC Character Type → Type → Select “Custom”.

NPC Character Behavior → Behavior → NPCBehavior Script → Add Verse code with the behavior logic.

NPC Character Modifiers → Cosmetic Modifier → Character Look - Select “Character Look"

NPC Character Modifiers → Cosmetic Modifier → Character Blueprint - Select the previously created Blueprint.

NPC Character Modifiers → Scale Modifier → Scale → Scale Factor → Set the value to 3, 4, or higher.

Expected Result

After starting the game, the NPC should be scaled to the specified value, and its behavior logic should work correctly.

Observed Result

After starting the game, the NPC is scaled to the specified value, but its behavior logic stops working correctly (it does not attack, does not detect the player, etc.).

Platform(s)

PC

Island Code

2734-2147-6836

Video

Hi @Islander, based on our tests on the Scale Modifier usage, we can confirm that NPC behavior logic works correctly at every size tested.

However, from what you have recorded in the project, it seems that the NPC kept reset its position and failed to execute the behavior logic. Did you use any custom teleport logic with offset that might not be not working well with the different scales?

Hi, @QH_DreamMaker!
I did not use teleportation with an offset. Here is the full logic code of my AI:
(https://dev.epicgames.com/community/snippets/V0AK/fortnite-boss-pumpkin-gold)

After your message, I decided to change some variables in my code, and after that the logic started working the same way it did before. Here are the changes I made:
RadiusFightZone : float = 600.0 → RadiusFightZone : float = 820.0
AttackTriggerRadius : float = 600.0 → AttackTriggerRadius : float = 820.0
RadiusForTeleport : float = 10.0 → RadiusForTeleport : float = 270.0

But this still seems like strange and illogical behavior.

Why does the NPC’s vision radius change after increasing the model’s size? The vision radius starts to diverge from the actual distances in the game world.
This especially affects the spawn point. If I set the RadiusForTeleport value to less than 270.0 units, the logic stops working.

I tested this on my other NPCs and the same thing happens everywhere. Scaling the model via NPC Character Definition somehow affects those parameters (vision, distance calculation) that it should not affect.

Please investigate this issue in more detail, I think there is some error at a fundamental level in the design of this tool.

Thank you!

FORT-1154906 has been added to our ‘To Do’ list. Someone’s been assigned this task.