YesNoOk
avatar

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

Started by RΣDDBRIПK, 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
  • ***
  • Elite Gaming Specimen
  • twitch.tv/reddbrink
    • 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
Penguinz0 said:
"Oh its all happening! Everything that's ever existed is happening at once!"
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
  • ****
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 Ryuko718 Updated 10/31/22 vVv
Re: flipping issue when using AngleSet with missiles
#4  September 28, 2019, 08:41:33 am
  • ***
  • Elite Gaming Specimen
  • twitch.tv/reddbrink
    • USA
I had already figured this issue out,  but i had forgotten to set this topic to solved.
Penguinz0 said:
"Oh its all happening! Everything that's ever existed is happening at once!"
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 Ryuko718 Updated 10/31/22 vVv