Hi. I currently have a projectile that is set to collsision OverlapAll. This works fine for collisions with actors but it seems to move through my walls without stopping. How do I rectify this?
Thanks,
Hi. I currently have a projectile that is set to collsision OverlapAll. This works fine for collisions with actors but it seems to move through my walls without stopping. How do I rectify this?
Thanks,
Go to Collision > Collision Properties of your projectile and set it to Projectile. OverlapAll overlaps and passes through objects it encounters.
If you read my message, projectile is already set to Overlap All. I dont want it to pass through any objects it encounters.
oops sorry I misread that. Though I dont find Projectile in collision presets. Where is it exactly?
Hmm, it comes with FPS template by default, but nevermind. You can create a custom projectile collision channel in Project Settings > Collision > Preset. Set everything except Physics Body to Block and set Physics Body to Overlap, and that should do.
Nah. Didnât work. I am using Side Scroller template and in collision presets there is an object type called âprojectileâ that is not available to my project. I tried duplicating this preset but still no joy. Any further help would be greatly appreciated.
Hey ,
When setting up projectiles, itâs usually a good idea to create a new Object Channel as well as a new Collision Preset. In Project Settings > Collision, create a new Object Channel and name it Projectile. Set its Default Response to Block. Then create a new Preset, also called Projectile. Set CollisionEnabled to No Physics Collision and ObjectType to Projectile (which you just created). You can then make adjustments to how Preset interacts with other object types. In your case, I would leave most settings to Block, set Pawn to Overlap, and set Projectile to Ignore. Depending on your camera setup, you may also want to set Visibility and Camera to Overlap, but you can wait if itâs not causing you any problems.
That should give you a good default setup for your projectileâs collision. You can then make changes to collision settings in your projectile Blueprint to customize it for different circumstances. You should also check your Collision Preset for Pawn to make sure it is set to overlap projectiles rather than block them.
Hope that helps!
Yeah that helps but setting up a custom object channel and collision preset with most settings to block, pawn to overlap, and projectile to ignore doesnât stop projectiles from passing through walls. Any further help would be greatly appreciated.
Thanks,
Would you mind setting up a simple test project in which this problem occurs and uploading it somewhere I can get to? Thanks!
Hey ,
I havenât heard back from you in a while, so Iâm going to mark this resolved for tracking purposes. Let me know if you can set up a test project for me and I can look into issue further. Thanks!
You didnât specify if your walls are brushes or meshes. If brushes, then that would be problem as brushes do not possess collision; you would need to replace them with meshes or convert them to meshes (which can be done via Details window when a brush is selected.
For sake of another opting answer:
(From UE4 tutorial videos of âTwinStickShooterâ). 3 Steps: (Projectile BP; Object (in my case, a Tank); Collision Box for Object).
(This wont avoid making player character going through object (Tank), that is why you will add a component âsimple collision boxâ to it)
Might not be best solution ever. But solved problem of having projectiles going through tank.