Cone Check/Cone Trace
EDIT: As I found a solution to my first question, I'm changing the question to just focus on my other question.
I'm looking for a way to reliably do traces in a cone from an object. In my project I'm using a Behavior Tree, and as the Cone Check decorator comes with it, I was wondering how it works. I can't get it to function properly, even as I have created a debug cone to help me out with the matter. As there is no way to properly debug it, I have no idea how to make it work properly with trace blueprints.
My question is: Is there any way of having some reliable cone tracing in UE4? Cone Check has been working sporadically, but I'd like to know if there was some way of just having a Cone Trace?
Hey there, I just created this tutorial and the first thing I do is create a cone check for the AI. It uses simple maths and you can just loop through all the characters you want to find out which are inside the cone.
Hope it helps!
answered Jun 08 '15 at 04:21 PM
Asher S Einhorn
this is just something i came up with in a few minutes.
I used a for loop to make 5 Single Sphere Traces and used some math to position them each a bit further away from the character and also to make them bigger. I added a short distance between the start and endpoint, because otherwise it didn't want to detect colisions.
I guess there is a better solution, but maybe this gives you an idea on how to do it.
And the Blueprint:
If you have questions or if you want to discuss this method, feel free to ask me.
If you plan to make a bigger discussion about this topic, please stick to your forum post.
answered Nov 03 '14 at 10:41 PM
I'm starting in visual scripting but I think what I did is not bad (tell me if it is). I trace a square rotated 45° with a start and an end at the same distance. Then I check the closest actor in the square with a maximum distance from the player character, to respect a cone shape (a square cut in half). The prob is I can only have a cone with fov 90°.
Here is my fonction if it can help :
(yes, start and end are the same, there are two same pieces of script, to adjust if needed)
Follow this question
Once you sign in you will be able to subscribe for any updates here