Page 1 of 1

Circulation of the Spike Blobs(CotSB)

Posted: Fri Jun 06, 2014 10:55 pm
by Jutomi
I have been rather baffled at this...

now, if you recall, Midnight Synergy's level called "Custom Calamity"(I think) contained three of the golden custommodel objects.
If you all so remember, the object in the middle moved around in a circular pattern.

I don't know how to do that. :?

I know how to make them move in a diagonal line, but not circular.

There's a reason why I'd like to know, too - but it's for a project I won't get to for quite a while...

I just wanted to ask, in case any body knew how to make them move in a circular fashion, how they did it.

Thanks for reading this post. :mrgreen:

Posted: Fri Jun 06, 2014 11:02 pm
by Wonderland King
I'll look in the editor. :)

EDIT: It has a YawAnim of 6.

Posted: Fri Jun 06, 2014 11:54 pm
by Jutomi
Oh! :lol:

Sorry, when I said "circular momentum", I should have clarified...

I didn't mean its rotation, I meant its actual circular tile momentum. :lol:

Well, I found out that setting it to negative numbers seems to change it a bit, so I could probably figure out how to make a circle from that.

I've all ready made an arch, though, so I'm sure that a circle's not far behind. :mrgreen:

Posted: Sat Jun 07, 2014 12:25 am
by Wonderland King
I understood what you meant, but maybe I missed something else. :lol: 8)

Posted: Sat Jun 07, 2014 1:19 am
by Wonderman109
This would be useful to learn more about. Something about those golden spikeys...is just so interesting.

Posted: Sat Jun 07, 2014 7:12 pm
by Pawelec
I see you need some math...

Moving an object around circular path isn't possible just like that in 3D coordinates system. It is done by moving an object along a helix which has no height, what makes it move in a circular manner. I won't give you a lecture about how helixes are formed in coordinates system. Only things you need to know are:
- Patrick coded the engine to use sin(t) function as X/Y/Z Anim parameters,
- Patrick coded the engine to use cos(-t) instead of sin(t) when t is negative,
- an object moves along a helix when it moves along sin(t) in one axis and cos(t) along the other.
This means if you want an object to move in circles around one Z axis, you need to set XAnim to r, Yanim to -r, where r says how far from the center tile the object can go. Swapping the r's (so XAnim is -r and YAnim is r) makes an object go along the same circle, but in opposite direction. The simplest example is XAnim = 1, YAnim = -1, ZAnim = 0.

The thing is briefly mentioned in How To?... Custom Options PDF.

Now enjoy Custom model trying to catch its back.