So I’m having this issue where I’ve set up a bullet and a few targets.
On component hit I destroy the bullet and spawn a “Blueprint Effect Explosion”.
For each actor, I copied the code and do the exact same thing. Everything works ok, except if I have an actor that is sliding left/right with a timeline.
Sometimes it destroys the actor, other times the bullet goes right through it.
It is very inconsistent and frustrating. Is there anything I can do to fix this? I tried linking the “On Component Hit” to the collision box or the static mesh. I tried enabling and disabling CCD for both. Nothing seems to make it consistent.
It’s a crapshoot. What am I doing wrong?
For the static targets, everything works perfectly.
With the Timeline disconnected it works perfectly. Once I connect it it’s a hit or miss mostly miss. It takes about 5-10 shots to actually trigger the collision
You will need to switch to Projectile Movement Component for the bullets - it comes with additional features that help with handling high velocities; as a bonus you get a ton of other useful stuff:
Would you be kind enough to show me how to change it to that? And is it enough if I just add a projectile movement for the bullet? do I need to change anything else in the code for the targets?
If I’m using the projectile movement comp, do I ditch the add impulse all together or do they work in conjunction? How do I launch the bullet?
Thanks for being so patient with me, I’m still figuring things out
Collision against the Pawn is Ignored so we do not shoot ourselves. The static mesh has collision disabled. There’s no physics simulation on the sphere or mesh.
You can use the following setting to give it desired speed:
We’re shooting in the direction the player is rotated.
There’s another method of launching them using Velocity. Imagine a situation where the player is on top of a moving train. The bullets should already move at least as fast as the train due to relativity.
I thought I actually was moving the whole thing, since the mesh is linked to the wall_collision, which is the root. I tried getting a reference to “self” as the entire actor, but that is not a valid target for the Set Relative Location
hmmm, I guess I was just moving the mesh without the collision.
However, if I plug in the collision box to the Set Relative Location… the actor just starts hopping around the scene uncontrollably… pretty funny.
Hmmm, what am I doing wrong with the timeline???
I set it up exactly like you, but after it slides the first time, it jumps back from the beginning. (without sliding back)
On the second slide it goes ok, forth and back.