Rendering of rotated items.

You are viewing a static copy of the old 2DBoy forum, which closed in 2010. It is preserved here for historical interest, but it is not possible to reply to topics. For more recent discussion about World of Goo, visit our new forum.
Rendering of rotated items.MattOG03/07/2009 - 06:33

Think the title kinda describes it.

This is either a goo-tool, or game issue, not sure which.

Ok, think tumbler. You'll get an idea of what I'm doing.

From there, using either WoG-Editor, or a text based input to set the rotation of an item to

45.0001052296

After rendering in game, the angle becomes

2578.3161073

Which not only isn't what I put. It's not the equivalent either.

Basically instead of a perfect hexagon, I end up with the top, bottom, left, and right all being perpendicular.
and the diagonals all being off, the angle should be closer to

2565.0059980872

(Which is exactly 57x the original amount)

Any ideas on whether it's the game's rendering, or goo-tool. As a side, If I encrypt the data with gootool, wog editor will read it as the above figures too. Yet unencrypting it will set it back to 45.0001052296

Hope I explained this properly


::EDIT::
If I set the angle to 2565.0059980872 manually. I end up with something ridiculous like 14000000000.. Completely throwing off the rotation.

::EDIT2::
It makes sense to be a game thing... Just thinking about the angle being 45.0001052296 in the first place instead of 45.

Out of interest I set it to 44.767695313632058580416065351068, which give a perfect render of 2565 (57 x 45)

Still be interested to hear why it does this though.


Last modified Sat, 03/07/2009 - 06:55 by MattOG
Re: Rendering of rotated items.Soultaker03/07/2009 - 09:10

I don't know exactly what you're talking about, but I'm sure your problem is that you specify the angle in degrees (range 0 to 360 for a full circle) while you should have specified it in radians (range 0 to 2pi for a full circle). If you interpret 45 as radians, then the equivalent in degrees is 45/pi*180 = 2578.31.etc.. which is what you observed.

So if you want to set the rotation to 45 degrees, simply specify 45*pi/180 = 0.78539816..etc.. instead.

Re: Rendering of rotated items.MattOG03/07/2009 - 09:24

Radians... now that I didn't think of....

I assumed it was degrees, as setting 45/90/180 etc shows the correct level of rotation.

Will have a look now.