Colliding with a wall and stoping the actor
So how do I do this with C++. I have to do this with C++ for an assignment and I'm attempting it with box collision. I have the unfortunate issue of either not knowing what to search for or everyone is just using the easy blueprint method that I am not allowed to use.
I've got the following in the cpp file void AWall::OnBeginOverlap(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
I assume I need something in there. I just don't know how to get it block anythig from going through. if it helps I have another active collision issue here with a different class but, setup in the same way.
asked Aug 18 '18 at 09:19 AM in C++ Programming
There is no need to handle a custom overlap event for this, just use sweep. Take a look here: https://www.unrealengine.com/en-US/blog/moving-physical-objects Just make sure that your wall collider has the "Block all" collision profile and sweep the actor that moves towards the wall.
Follow this question
Once you sign in you will be able to subscribe for any updates here