Hi,
Is there a way in blueprint to receive information on which actor/component is blocking the movement of the character? Just like there is a GetBaseActor, which returns the actor the character is standing on, I was wondering if there is a getBlockingActor that would return an actor in front of the character, into which he is bumping. If I am not mistaken the character movement component performs sweeps with the capsule component, so I thought, could it be simple enough to return an actor blocking that sweep?
Kind regards,
Marcin
We don’t cache the “last hit” in CharacterMovement, and there maybe multiple hits per simulation step, but there are a variety of ways to get notifications for such events (called in this order)
- virtual AActor::NotifyHit()
- Actor blueprint event EventHit (called by NotifyHit())
- virtual UCharacterMovementComponent::HandleImpact()
- ACharacter::MoveBlockedBy() (called by HandleImpact())
Hi,
We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.
Thanks!