YesNoOk
avatar

flipping issue when using AngleSet with missiles (Read 584 times)

Started by ReddBrink, September 12, 2019, 03:53:29 am
Share this topic:
flipping issue when using AngleSet with missiles
#1  September 12, 2019, 03:53:29 am
  • ***
  • "Contrary to popular belief,
  • I know exactly what i am doing".
    • USA
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
Tony Stark said:
"You can take away my house, all my tricks and toys, but one thing you can’t take away... I am Iron Man."
Last Edit: September 28, 2019, 08:44:19 am by ReddBrink
Re: flipping issue when using AngleSet with missiles
#2  September 25, 2019, 07:21:38 am
  • ***
    • beterwork-us.hopto.org
My MUGEN Website ==> for All my Characters Stages and Articles
https://beterwork-us.hopto.org
Re: flipping issue when using AngleSet with missiles
#3  September 28, 2019, 08:35:51 am
  • *****
  • Shame on you!
    • USA
I would try something simple at first. Try
* facing
at the end, or something like
abs(   ) around the whole thing.
vVv Wheat Stage Released vVv
Re: flipping issue when using AngleSet with missiles
#4  September 28, 2019, 08:41:33 am
  • ***
  • "Contrary to popular belief,
  • I know exactly what i am doing".
    • USA
I had already figured this issue out,  but i had forgotten to set this topic to solved.
Tony Stark said:
"You can take away my house, all my tricks and toys, but one thing you can’t take away... I am Iron Man."
Re: flipping issue when using AngleSet with missiles
#5  September 29, 2019, 12:07:51 am
  • *****
  • Shame on you!
    • USA
Twice it seems. Make sure you mark your threads as Solved.
vVv Wheat Stage Released vVv