The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: ReddBrink on September 12, 2019, 03:53:29 am

Title: flipping issue when using AngleSet with missiles
Post by: ReddBrink on September 12, 2019, 03:53:29 am
I know i already posted this on my thread but i figured i would post it here as well to potentially get more info.

Here is the code i am using to angle my missiles.
Code:
[State 1240, Guided Missile]
type = AngleSet
trigger1 = 1
value = (atan(Vel Y/Vel X) + (3*pi/2)) *(-180/Pi)

[State 1240, Draw State]
type = AngleDraw
trigger1 = 1
Scale = 0.8,0.7
This does work. Up until the point in which the missiles face straight down then they flip and face straight up.

Here is a video with the issue in question
Spoiler, click to toggle visibilty
I will note that i have already fixed the pop in the animation. its the flip i cant seem to figure out.

Also i have tried changing this
Code:
[State 1240, Guided Missile]
type = AngleSet
trigger1 = 1
value = (atan(Vel Y/Vel X) + (3*pi/2)) *(-180/Pi)
to this
Code:
[State 1240, Guided Missile]
type = AngleSet
trigger1 = 1
value = (atan(Vel Y/Vel X) + (3*pi/2)) *(-360/Pi)
This does fix the flip but the missiles spin uncontrollably. What i am missing here? I apologize for my long post.

EDIT: This issue has been resolved.

This is what was Used to fix the issue. (For now until more problems arise lol)
Code:
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim != 1241
trigger1 = vel x < 0
trigger1 = vel y > 0
value = 1241
 
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim != 1240
trigger1 = vel x > 0
trigger1 = vel y < 0
value = 1240
Title: Re: flipping issue when using AngleSet with missiles
Post by: beterhans on September 25, 2019, 07:21:38 am
I know i already posted this on my thread but i figured i would post it here as well to potentially get more info.




download my awk morrigan
fire the move called Finishing Shower
I believe you will find what you need
http://mugenguild.com/forum/msg.2083389 (http://mugenguild.com/forum/msg.2083389)

the problem is complex... I remeber angle thing work like this
0 facing forward
90 facing up
180 facing back
-90 facing down


Title: Re: flipping issue when using AngleSet with missiles
Post by: Odb718 on September 28, 2019, 08:35:51 am
I would try something simple at first. Try
* facing
at the end, or something like
abs(   ) around the whole thing.
Title: Re: flipping issue when using AngleSet with missiles
Post by: ReddBrink on September 28, 2019, 08:41:33 am
I had already figured this issue out,  but i had forgotten to set this topic to solved.
Title: Re: flipping issue when using AngleSet with missiles
Post by: Odb718 on September 29, 2019, 12:07:51 am
Twice it seems. Make sure you mark your threads as Solved.