YesNoOk
avatar

Oval Rotation (Read 763 times)

Started by KamiyaKasshinRyu, May 23, 2009, 06:29:07 am
Share this topic:
Oval Rotation
#1  May 23, 2009, 06:29:07 am
  • **
Heya!
I need help.
How do I make a perfect oval rotation like this?
I really don't know about velocities that are related to rotations.



Help Please.
Thanks.
Re: Oval Rotation
#2  May 23, 2009, 07:52:48 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
It's actually a bindtoparent effect. Check out the code library, there's something in there.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Oval Rotation
#3  May 23, 2009, 12:45:05 pm
  • **
I guess you want your player/helper to make a oval movement without itself rotating?
Then just give it a periodic (sin/cos) x and y velocity with the x velocity being higher than y (like 2 times or 3 times higher).

Use velocities like this:
A*cos(Time*Pi/B)
"A" determines how big the "ellipse" is and "B" how long it takes for one rotation.
Keep in mind that you've got to use different functions for the x and y velocity ("cos" for one and "sin" for the other).
Latest Creation: SSBB Assist Trophies
Re: Oval Rotation
#4  May 24, 2009, 10:58:00 am
  • ****
Hmm, this is quite interesting indeed.
Might come in useful one day.

No Borders, No Nations
Re: Oval Rotation
#5  June 11, 2009, 04:06:03 pm
  • **
It's actually a bindtoparent effect. Check out the code library, there's something in there.

Thanks a lot.
This helps me during binding is needed.
Thanks.

I guess you want your player/helper to make a oval movement without itself rotating?
Then just give it a periodic (sin/cos) x and y velocity with the x velocity being higher than y (like 2 times or 3 times higher).

Use velocities like this:
A*cos(Time*Pi/B)
"A" determines how big the "ellipse" is and "B" how long it takes for one rotation.
Keep in mind that you've got to use different functions for the x and y velocity ("cos" for one and "sin" for the other).

Thanks a lot.
this helps me when didnt need binding.

Anyway, i have one question.
how do i make a starting point like this for rotation?


coz' i cant make it like that.
when my helper's velocity is x = -6 and time is lower than 9.
after about time = 9.
it will change to rotation.
but, instead of rotating like that in the image, it will start rotating having upward-left movement first.
instead of left then left-downward movement.

Sorry if my explaination is like complicated.  :sugoi:

Please Help.
Thanks.
Re: Oval Rotation
#6  June 11, 2009, 04:22:46 pm
  • ******
  • [E]
    • Mexico
it's a bit about some basic calculus concepts, you don't really need them as long as you use sin for one coordinate and cos for the other, then adjust the values.
Re: Oval Rotation
#7  June 11, 2009, 07:10:43 pm
  • ***
Also check out some of the street fighter characters, they have rotating stars around their heads for their dizzy states. It's animation and like that other guy said it's a binding thing when you code it. An explod code I guess?

You can copy the x,y positions of every sprite or design it yourself using the onion tool from fighter factory.

Another character you wanna take a peak at is Ultraboninja's Ms.Marvel, she has a rotating fire ball move around her body.  ;)
Re: Oval Rotation
#8  June 11, 2009, 07:35:50 pm
  • **
For this example at the starting point the X velocity is at its negative maximum and the Y velocity is at zero and then increasing to its positive maximum.
This means the X vel has to be -cos(...) and Y vel has to be sin(...)

Try this:
x = -cos(Time*Pi/180)
y = 0.5*sin(Time*Pi/180)

If you want a faster movement use 60 or 120 instead of 180.
Latest Creation: SSBB Assist Trophies
Re: Oval Rotation
#9  June 12, 2009, 04:46:04 am
  • **
For this example at the starting point the X velocity is at its negative maximum and the Y velocity is at zero and then increasing to its positive maximum.
This means the X vel has to be -cos(...) and Y vel has to be sin(...)

Try this:
x = -cos(Time*Pi/180)
y = 0.5*sin(Time*Pi/180)

If you want a faster movement use 60 or 120 instead of 180.

Wow. It really works.  :o !!!
Thank You Very Much MikeDaBike For Help.
It was great. Thanks for helping me out.  :sugoi: