Creating collisions in c++

I am a beginner and i am trying to create collisions between my boxes so they crash into each other to activate if’s but i don’t know how to create collisions to actually make them collide and then connect said collision to an if so when they do collide it will activate the if.

Have you read the Collision Overview documentation? It goes over setting up a simple collision.

Let me know if you have any specific questions afterwards.

Thanks it did help but i still need to set it up for in visual studio . I think to be more specific i need to know how to set up the OnHitComponent i know about it and how it wjorks, but i just draw in a blank on how to write it down

Edit: Okay im an idiot im a complete idiot i literally just had to call sweep and then figured out all i had to do for that was just write true after the fvector in worldoffset but i still gotta find a way to put a condition in if so the bool changes from true to false whenever it crashes into anything

You might want to look into the OnActorBeginOverlap which is called anytime one actor’s physics volume overlaps with another.