Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

[MMF2] Angle + Positioning?


Asuma

Recommended Posts

I'm trying to get the these shield pieces to rotate and position right with the main drone here.

It works fine when when is opened.

SS1-1.png

SS4.png

I got it work by making a mask of the drone+plus the shield.

This is how it looked closed, and it's starting angle.

SS2-1.png

When it beings to rotate, it does this.

SS3.png

My question is, how do I get the to rotate and position properly?

My guess it that I need to use sine/cos with the X/Y Position of the shields, but I know basic trig.

Something like this.

X( "Object" )+Range*Sin(Delta)

Y( "Object" )-Range*Cos(Delta)

Edit: You know, after bit of testing, I got it.

X( "LaserBot" )+NudgeX( "LaserBot_Shield 1" )*Cos(Angle( "LaserBot" ))

Y( "LaserBot" )-NudgeY( "LaserBot_Shield 1" )*Sin(Angle( "LaserBot" ))

Still would like your input. Also, is there a way to alternate between two values using one event? Like alternate between 0 and 1.

Also, there is something else. I have a flamethrower type weapon. I want the flames to spiral out, so I'm assuming I can use this?

Like the laser in this video.

X( "Object" )+Range*Sin(Delta)

Y( "Object" )-Range*Cos(Delta)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...