OnComponentBeginOverlap inconsistent HitResult data

While using OnComponentBeginOverlap (CollisionVolume) in Blueprint, the HitResult output pin occasionally has correct information but occasionally does not. For my RailgunProjectile, the Hit Location reports correctly. For my RocketProjectile (same superclass, slightly different subclass behavior), the Hit Location is always (0,0,0). What are the criteria under which a valid HitResult is supplied to OnComponentBeginOverlap? Why is this inconsistency allowed? Adding a boolean to report if the HitResult is valid or not would be extremely helpful.

Hey GrimlessBBS-

Are you referring to the Sweep Result pin? If so, this will only return a result if the object being move is set to sweep (such as using the AddActorWorldTransform node). If your rocket projectile is using physics to move, it is likely not using sweep thus the return that you’re seeing. Can you provide further information on how your projectiles are setup in blueprints including how you’re moving both projectiles?

Ah! Ok, I suppose that makes sense. The Projectile for which that node works is using the ProjectileMovement ActorComponent, while the one for which it does not work is using a PhysicsThruster and physics sim. Unfortunately, this means that I can’t have a generic event handler for Projectile impacts because of this limitation; is that correct?

If your projectiles are using different methods of movement/updating position then a single event may not be the best solution. Rather than trying to use an overlap event for your rocket, it may be best to use the Event Hit which, if the actor is set to generate hit events, should trigger when the rocket collides with another actor rather than when an overlap occurs.

Cheers

I want to apply a force once on objects when they enter a volume. So from what I understand I will not know where and in which direction to apply the force if those objects use physics when entering the volume, because my sweep result will be empty. Is this correct? How do I work around it? I think using hit events wont help me, since the volume should allow objects to enter it, and hit result are only fired if the volume blocks them.
Can you also point me to some ressource explaining what exactly sweeping is? I am stumbling all over this, but have no idea what it actually is.

Greetings,

Simon

Hey pulp_user-

Are you applying the force based on where the object enters the volume? What I mean is, does an object that is entering the volume from the front get the same force applied to it as an object entering the volume from the left or top? if this is the case, you should be able to use the Overlapped Component pin of the BeginOverlap node to add the specified force amount to the object entering the volume. If you are doing something different, it may be best to create a new post to focus attention to your issue in it’s own location rather then being buried in this post.