2 Attachment(s)
Re: A problem with lag...
There's a mathematical way to do what you want to do here.
To get the angle between Point A (X1, Y1) and Point B (X2, Y2) in MMF2:
ATan2(Y1-Y2, X2-X1)
Thus, to get the angle between the an object at (X, Y) and the Mouse:
ATan2(Y( "My Object" )-YMouse, XMouse-X( "My Object" ))
See the attached example :)
Re: A problem with lag...
Re: A problem with lag...
Ok, one more question: is there any way to make it so that you can shoot from the object more precisely? When i say launch bullet at 0,0 from cursor, it seem like it can only shoot in like 16 angles.
2 Attachment(s)
Re: A problem with lag...
That's because the Launch Bullet action only uses the directions that you have in your bullet's animations, be it 1, 4, 8, 26, or up to 32. If you want precise bullet shooting, check this example. Despite the example's name, it is much more precise than just 1 degree, it is as precise as MMF2's double precision floats can get (which is really precise, approx. 15 decimal places)