Creating a casting circle

What is the easiest way to get the ring effect to follow my crosshair along the ground in the same vein as Darwin’s Ana 'nade tool? Do I have to use all the math/variables his does or is there a more streamlined way? I’m looking through his code and it’s a bit overwhelming.

I’ve already assigned the effect to a button and it goes away when I tell it to. I don’t need it to do anything else other than follow my crosshair.

I thought I only needed to assign the effect to eye position, but that just makes it appear beneath me. What am I missing, fam?

You can add the facing direction of yours and multiply it with a small offset distance like 1 unit. The Ring effect seems only to appear or visible on surfaces anyway and the additional parameters i mentioned should be enough to project the ring where you looking at or where your crosshair is. And the math in there is a Projectile Motion over time affected by gravity, which forms a parabolic trajectory for the nade to travel along.

Thank you for replying!

I’ve made a player variable that sounds (to me) like what you’re suggesting - and setting that as the position for my effect - but still nothing. :’(

If it’s not too much trouble, could you show an example of what the code should look like? The correct order it should be in?

Here you go, you can tweak around the values a bit if you want, instead of adding and multiplying the facing direction offset i used the alternate world vector transformation which embed the whole calculation mentioned. Here is the code: 3YBHQ

Thanks again!

Actually, I did what I should have done from the START and revisited Shrew Berry’s projectile tutorial. I used part of what he did, and it works perfectly! I even got it to only appear at a maximum of 20 meters away. :slight_smile:

I kinda feel like I wasted your time but thanks anyway. ^^

1 Like