Hi, so I have a unit that shoots projectiles and it works fine. But when I try to shoot a projectile who inherits from the previous one, the mesh spawns but is just stuck in the air.
Initial speed is high (10,000), velocity vector is (1,0,0), mesh and capsule set to “movable” and movement component set to auto activate.
From my research, I found it has something to do with the inheritance, but couldn’t quite make out what is the fix. Any help will be appreciate.
Picture of what happens when I try to shoot the child projectile:
Could we see the parent component hierarchy? Can you share anything about the parent?
my projectile, Who is a child actor
Child Actor usually refers to an actor spawned by a Child Actor Component. Could you clarify what you mean, as this would be a very odd choice for a projectile, indeed. This is a Child Actor Component, for example:
Both the trace and the sphere has a collision (BlockAllDynamic), but that’s also the case with the parent class and it works fine.
“Assuming the child works fine when not inheriting”-Not exactly sure what you mean. The parent projectile works fine. There is no logic attached to the “beginPlay” in the parent projectile.
Update: I make the unit shoot one at a time to see better. Sometimes, the first few bullets work fine, then from like the 5th-10th bullet, the problem starts. Other times problem starts from the first bullet.
I am dumb. I called an “event hit” on the projectile that inherits, thus replacing the previous “event hit” logic of the parent. But, I forgot to but “destroy actor” in the new projectile as well. So the bullets collided with each other but weren’t destroyed. That was the problem.