It hits but then there's no way to tighten the width. I was hoping to be able to adjust the swing along the X axis.
Printable View
It hits but then there's no way to tighten the width. I was hoping to be able to adjust the swing along the X axis.
Maybe I don't understand,
width of ellipse (you speak about the a_param, right?) gets resized while you move the black active object
and you can still change the origin position of ellipse
(in the example it was by dragging the red dot.. this may be unhandy if you set the origin Y relative to black active
but you can change X position of origin -red dot- in any way you like)
Here you go. Thanks for the exercise. I learned a lot trying to make this happen. :) Hopefully the comments help you understand. The hardest part was figuring out the equation.
Cool work mobichan!
I've come to learn that trigonometry is of huge usefulness within a game <3
For completeness,
here's the slightly modded version of the previous example to do what's been last asked with moving player/target etc.:
Attachment 16929
(As usual, first line is the only needed.
It carries over all the objects used for reference in previous examples, but obviously you could delete most of them and use values as position holders)
Sorry, had to step out yesterday.
That's great! Good examples :) I know they'll be useful.
What I was trying to say yesterday about modifying the width was in the original equation of the ellipse, there's an input specific for the width. Possibly resulting in a tighter curve.
I thought it was the Y distance that determined whether the target was hit XD I think you both understand the math better than I do.
Jared: I pointed out in my comments in the mfa that you would change the RadiusY variable to change the width of the elliptical path. I coded it to use half the RadiusX var but you can change it to anything. Good luck!
Yup, I started looking at yours more closely a few minutes ago :) I already got some ideas how I'm going to use this. Thanks!