I was trying to rewrite something I made following a tutorial in blueprint in C++. I have some experience in blueprint and I’m quite familiar with Unity and C#. How would I recreate a macro like the one in the pic in C++?
I am sorry that no-one replied to you. At first glance, your code looks excellent. However, you forgot to multiply the capsule radius by 5, and several of your local variables are unnecessary IMO. It would help a great deal if you explained exactly what doesn’t work in your code.
I was about to reply myself. I solved the issue. To be fair there wasn’t any issue to begin with.
I fixed and simplified the code. There were a lot of variables to work with so I was overwhelmed. I thought the mistake was from WorldContextObject variable but I was simply calculating the end vector incorrectly. I’m still not sure about what exactly WorldContextObject does to be honest, just UObject* WorldContextObject = this;
worked correctly. I can’t seem to find what it represents exactly.