Download

Fireball projectile not colliding

Hey all!

So I made a projectile that fires from my character (2d game) and it shoots okay and everything however it does not collide with my enemy. However when I just drag that blueprint to the game it actually collides with the enemy and does everything it’s supposed to do (Print a statement). I attached my character and fireball blueprints.

I have tried the following:

Turning off/on simulate physics
Remake the blueprint (several times)

cc2107ddb4a03d08cd4afaab8ad499c8fd261fd9.png
d93194a17c7a7b1af521cca4767242bd60c54817.png
9b668ce1c2121579a628e2358b4cfc7eb6e9a495.png

Thanks a ton!

I’ve never used projectile movement, but for fast moving objects looking at CCD (continues collision detection) could help.

hey wolfsblut! I tried that (seemed like a good idea) but that didn’t seem to do anything. Another interesting thing I noticed is that when I changed the projectile movement gravity back to 1…the one I had placed in the level stayed straight while the object im spawning actually takes the gravity in consideration…

go to your component tab, check collision presets.(And your role in the preset, which is important.)
You will need to overlap everything. Also, if your enemy’s collider/mesh doesn’t collide with collision shape, it will fail as well.
Meaning: if A want to collide B, both needs to setup so that they can collide each other, doesn’t matter who initiate the event call.

Attached is the collision presets (I set all of them to overlap all) and I put the blueprint into the level and when it does collide with the enemy, it prints out the statement that it collided…I think the problem might be that the fireballs I am spawning is possibly different from the blueprint class but I can’t for the life of me figure out why

4ba76ea336e9ba5bfbadce025c084a4d8df2580c.jpeg
07662fcc33e4919c6149a7ab677369c06aa12ea2.jpeg

Thank you all for the continuous help!

I could be wrong, but does you fireball stick outside the Collision sphere? It appears that way in your 3rd picture.

Could the fireball be hitting before the collision sphere causing an issue?

Regards

Narg

Could you add a collision node in the BP, just to make sure?

Narg

Hey Narg, I made the fireball fit into the sphere but nothing changed in the game. Also, how would I add a collision node? Still a little new to blueprints…

I was trying to debug and noticed something peculiar with the two different fireball spawns:

This image is the debug trace from the fireball I just dragged into the level
29fec78f34bac1060e51bdd1ba4dacfa3b5068dc.png

These two images are the debug trace from the fireball that spawns from my player:
b7b9257c249d04c697ebfa74813a7626df10a418.png
aea3284a023f13da3c591e2f3b2b614b00382491.png

After the construction script it goes back into the mycharacter blueprint waiting for movement…

Have you tried to break it down to see where it fails, or is it just failing on collision.

“Set Actor Enable Collision” - Sets collision for the entire actor.

Have you tried “On Component Hit” as a debug?

Narg

when you select overlap all, you should notice that your object type is “world static”, and collision is “no physics collision”.
Fireball should most certainly be either “world dynamic” or “physics actor”. The implication being if your actor are tagged as world static, even though you moved it, physics engine might still treat it as static.(so your collision might actually not moving at all to physic engine. this is purely personal guess, as a shape being tag as static means I don’t have to check and update unless I’m close enough that something is going to hit it.)

I don’t believe it is a collision problem as I tried the steps you’ve outlined, however I do not believe it is a collision anymore as I am digging more into it and in picture 2 my “make transform” node has a scale of Y set to 0, when I set it to 0.001 it seems to be colliding with the enemy!!! However it is only colliding when I am facing the enemy from the left side, when I am facing the enemy on the other side it seems to just collide with some imaginary thing. Thank you again for all your help! It is really helping me learn some blueprint debugging.

Edit: I realized that the problem with the other way is the fireball it hitting the player and thus it is working fully! Thank you all again for the help!