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)
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
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!