-
Stab Isuue
Hi,
So, I'm having problems with stabbing, the object is to have the spear-thing "stab" at the mouse when the space bar is pressed. I posted an example here of what I am trying to do. I thought I did it right, but obviously I did something wrong.
-Thanks, Variant
-
Re: Stab Isuue
If you want to stab directly at the mouse you'll need to use the trig functions, specifically ArcTan2 to get the arc tangent of the mouse's x and y position, then stab at that angle. Find the article on Sine and Cosine and why they are awesome.
-
Re: Stab Isuue
That's what I tried to do! But for some reason it isn't working.
-Variant
-
Re: Stab Isuue
Stabbidy
I'm not sure if this will be at all helpful, but it was fun to make. :D
-
Re: Stab Isuue
It kind of helps, but the issue is the object that is stabbing is more of a sword-type thing, so it would look kind of weird if the sword just expanded to stab someone. I was really hoping there was a way to do it "position wise".
-Thanks, Variant
-
Re: Stab Isuue
You might be able to fake it using an animation with moving action point. Example:
Stabbidy 3
-
Re: Stab Isuue
That looks nicer. I don't understand how it works at all though.
-Thanks, Variant
-
Re: Stab Isuue
I'll comment and upload a new mfa here in a bit...
-
Re: Stab Isuue
-
Re: Stab Isuue
I sort of get it, but it's not like straight enough for me, it's a great idea, but I think I'll just stick with my bad 2-directional idea.
-Thanks, Variant