Hi). The question is same as topic name)
nobody knows or it isn’t possible?
Need this too, up!
Maybe this is what you are looking for:
You can calculate the “thickness” of an actor using the actor bounds.
Thanks but this is not what I am looking for, because the thikness that I am looking for is more like “linetrace position in where it gets out of the object”. Of if the angle change the “thikness” will change respectively. (I know that the word thikness isn’t accurate)
I don’t know what you are trying to accomplish but it seems that maybe you would benefit from using a projectile instead a ray trace and use the hit actor start overlap and end overlap events to calculate the locations where the projectile enter and leave the hit actor.
The projectile stuff may work but that means that I should add a box trigger around all my objects.
What I am trying to achieve is sort of parkour jump that should trigger only when it is possible to jump over an object (a max thikness is imposed here). For example; conside the same figure that Jeka3d posted, if the player was running toward the object in the linetrace dirextion like in the figure he should be able to jump over, but if the player come from the other directio (vertical, perpendicular to the red line in the figure) he should be able to even start/trigger the jump animation.
Have a look at my answer in this thread:
Getting the distance between both Location vectors in FirstHit, and ExitHit would get you the thickness.
Aha so multiple linetrace can give the end hit of the same object? Didn’t know that… I’ll give it a try… Thanks!
Here is a solution I have used in the past that doesn’t use a ray cast
Find the direction toward your actor in question
itsPosition - yourPosition normalized
then from your actor add that direction vector * some comfortable length to push in the direction of the surface you want to test
Next use Get Closest Point on Collision
This will find the point on the surface of the collider nearest the point you projected
Since you projected a point that was some distance from the centre moving away from “yourPosition” that will be the point on the surface of the simple collider opposite the “yourPosition”
I have also done this using 1 ray
So same deal, find the direction, add the direction to the target’s position * some testing distance and then fire a ray back toward the target the first hit will be that same point