Raytracing and Objects question.

Hello again UE4 community.

Im having a small issue and cant seem to figure it out.

Ive been trying to cast rays to determine a suitable place to spawn an object, this in itself is not an issue as long as the start of the raytrace begins outside of any Colliders/Objects.

My question is, how can i detect if the raytrace begins (and possibly also ends) within a collider/object.

Thanks again.

You can use “is overlapping” but you need an actor or a component for it. (a small sphere attached at weapon point socket for example) and use it with a branch.

Thanks for the reply, ill implement it and see how that goes.

To further clarify that your solution will work. I tried to generate an Overlap event when i set the location of a sphere collider to the ray trace start point, however this does not work. Using the sweep option works in the sense that as it travels to the new location it will generate hit events on any colliders in its path, NOT when it is transported to the exact location.

It seems to me that it cant generate an collision event when it is teleported to a new location, only when it translates to that location.

Any suggestions on what maybe going wrong or if there is another way to solve this?

I just did some tries with an add spere collision and i couldn’t have it working too so my idea was wrong :frowning: but i have to try with a permanent sphere component too. i come back when tried ^^

After doing some research, ive found that using Simple Collision Trace instead of Complex returns a failed line trace if it begins within a collider. This was the functionality i was looking for.

Oh great ! Thanks ^^