Replicated RotationRate

Discussions about Coding and Scripting
Post Reply
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Replicated RotationRate

Post by Barbie »

I run into a problem: in Map "NaliBoat" is a windmill with rotating wings at a rate of Roll=-4096 (see pic) counterclockwise. If playing locally, it rotates as desired, but on net play it rotates much too fast and even in opposite direction.
Debugging on server showed that Mover1.RotationRate is (0,0,61440) instead of map's value of (0,0,-4096). Remarkable is that 61440=0xF000 and -4096=-FFFFF000, and on Wiki I've read that rotator components are compressed to the size of a byte - so the Roll value seems to be clamped in a way.
Any hints to resolve this?
<EDIT>
Sometimes phrasing the question includes the answer... I just passed the problem by with turning the wing wheel 180° around its z-axe and changing the Roll from -4096 to +4096. That value is replicated fine.
</EDIT>
Attachments
NaliBoat-Mover1.jpg
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: Replicated RotationRate

Post by Wormbo »

A note on the log output: The built-in Rotator to string conversion applies "& 0xFFFF" clamping to the components for output only. If you log the individual components, you'll probably see the correct values on the server side.
Post Reply