OnBeginOverlap from c++ not working
I found several posts here about it, but I cannot find what I'm missing in this case, so maybe someone else here is able to see that
I don't see the debug output here. What am I missing in this case?
asked Oct 07 '16 at 06:09 AM in C++ Programming
For those who are having the same issue, here is what I figured out
If you create a blueprint based, on a c++ class and later in that code (while the bp has already been created) you are adding "AddDynamic"-Bindings, you may have to delete and recreate the bp after compile, because the binding seems not to be recognized when the BP has created before
answered Oct 09 '16 at 07:59 AM
Since you are using AddDynamic Binding in constructor which is called initially.You have to do in begin play.
answered Jan 28 '18 at 06:38 AM
Do you need to actually set a RootComponent? (I also ask this to the community, not rhetorically!)
In my C++ actors, following from examples, I've always called CreateDefaultSubobject, like you have. Then with one of them, set it as the RootComponent. So in your case, something like:
I'm wondering if there must be a RootComponent set, before you can then call AttachToComponent( GetRootComponent()..., lest that return a NULL/nullptr?
answered Oct 07 '16 at 09:44 AM
You've told the actor to collide and you've told the component to trigger overlaps and you've tied your respondent method to the overlap event; but what you've missed is telling the engine/component how to decide if the overlap has been triggered. Specifically, you need to tell the component what other objects should trigger collisions or overlaps and which should be ignored. This is done in UE4 by assigning the component a collision profile and/or by setting specific responses to available collision channels.
In your component setup you'll want to add something like this:
You can build the component's channel response to respond differently to different channels, as well as create your own custom channels and collision profiles.
You can also set these values in the editor within the details panel of your object, under Collision and the Collision Presets panel.
For more details see:
Default collision channels and response types are defined in 'Runtime/Engine/Classes/Engine/EngineTypes.h'; see lines 553 and 743.
UCollisionProfiles are defined in 'Runtime/Engine/Classes/Engine/CollisionProfile.h'
Follow this question
Once you sign in you will be able to subscribe for any updates here