It sounds like the issue happens because the projectile skips over the ship when it’s farther away, likely due to frame-based collision updates. Try enabling continuous collision detection (CCD) on the CannonBall, and make sure the collision channels for both the ball and the ship are compatible and set to block each other. That should ensure hit detection remains consistent at any distance.
Hey, thank you. I’ve tried this just now and made a video:
It’s showing what happens in slomo, I just can’t understand it. I checked and I think the sphere collision, which is the parent of the ball mesh, is moving with the mesh as expected. The sphere trace is huge, and detects a nearby ship to home in onto. You can see in the print strings that it successfully detects and targets. But the home in part doesn’t happen, and neither does the hit. But when the ship is close like in the above example, it works fine. The sphere trace actually uses the collision mesh which is parented to the cannonball mesh component as the central location to radiate from. So the collision is definitely there
I have also ensure that the actor itself is moving too. It’s not just the collision mesh and mesh component that are moving while the actor is stationary. It’s all moving together
…this is driving me crazy I just can’t find anything relevant to this issue at all lol
I don’t understand why but, once the ship is close hits seem to work fine, if the ship is far then hits don’t work.
It’s the ship collision. I needed to tell it set collision on query and physics rather than just query…
I just can’t wrap my head around this one.
It makes sense I guess, the cannonball is the child of a sphere collision which simulates physics so I guess the ships collision also needs to just have physics collision on too so it can ‘feel’ hits from physics objects.
But why did it work in close range then?
Anyway it’s fixed now I can get on with my night lmao
Edit: I know why it only worked close range now: My cannonballs parent collision sphere does not simulate physics instantly. I tell it to simulate after the thruster and projectile movement activation which means there must be a half second of time or something until physics is enabled after it gets spawned. So in between that, in even slo.mo speed mode, it must be getting detected as a non-physics hits so my ship doesn’t need to handle physics collisions.