I’m trying to replicate the teleporter position / Mei wall placement targeting. I am very close. So far I have this:
actions
{
Create Effect(Event Player, Sphere, Purple, Ray Cast Hit Position(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(
Event Player) + Facing Direction Of(Event Player) * 20, Null, Null, False), Ray Cast Hit Position(Eye Position(Event Player),
Eye Position(Event Player) + Facing Direction Of(Event Player) * 20, Null, Null, False) + Vector(0, -100, 0), Null, Null,
False), 1, Visible To Position and Radius);
}
This “works”, but has the following problems:
- I have to duplicate this Ray Cast just to apply an offset to the outer Ray Cast’s End Pos from Start Pos. My Goal here is to look for the ground below where the player is aiming:
Ray Cast Hit Position(Eye Position(Event Player),
Eye Position(Event Player) + Facing Direction Of(Event Player) * 20, Null, Null, False) + Vector(0, -100, 0)
I tried to store the Ray Cast in a variable, but then the ReEvaulate part of Create Effect no longer works. So I setup another event rule that uses another duplicate of the Ray Cast as a condition to continually update the variable… But that is noticably slower (position doesn’t keep up with cross hairs).
I tried “Chase” but that doesn’t seem to work at all…?
- My downward Raycast gets caught on very small geometry on walls. Like in the defenders spawn room of Hanamura point B there is molding on the walls that my sphere will attatch to.
Is there a way to make it prefer the ground next to the wall?
-
The sphere is a bit gittery, even with the ReEvalulate version. I mean, it sticks to the cursor perfectly. But for a milisecond the sphere sometimes dissapears only to reappear again. What’s causing that? It’s almost if sometimes my downward Raycast is not hititng the ground but actually going below the floor.
-
Maybe a dumb question but - How do I get it not to appear if the downward Raycast hits nothing? I’m going to assume I need to check the Y value to see if it is < -50 or something.