Model rotation: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
[[Eduke32]] allows [[CON]]-definition of model replacement dynamic rotation for any [[actor]] with the members [[pitch]] and [[roll]].
[[Eduke32]] allows [[CON]]-definition of model replacement dynamic rotation for any [[actor]] with the members [[pitch]] and [[roll]].
[[Image:http://jedinight.free.fr/duke/dev/wiki/axis.png]]
[[Image:axis.png]]
While the [[pitch]] is a rotation about the Y-axis (i.e. would make Duke on the above picture lean forward if given a positive value), the [[roll]] makes the model spin around the X-axis.  
While the [[pitch]] is a rotation about the Y-axis (i.e. would make Duke on the above picture lean forward if given a positive value), the [[roll]] makes the model spin around the X-axis.  
The rotation center is the model center (rendered at the floor by Build) unless you offset it using [[mdxoff]], [[mdyoff]] or [[mdzoff]] member. That's what would give a 256 [[roll]] of the player [[actor]] :
The rotation center is the model center (rendered at the floor by Build) unless you offset it using [[mdxoff]], [[mdyoff]] or [[mdzoff]] member. That's what would give a 256 [[roll]] of the player [[actor]] :
 
[[Image:roll.png]]
[[Image:http://jedinight.free.fr/duke/dev/wiki/roll.png]]
 
If you put a -16384 [[mdzoff]] before the rotation, the center of the model will be moved to the height of the crate on the right of the screen, and you'll get a rotation which might be more convenient to you :
If you put a -16384 [[mdzoff]] before the rotation, the center of the model will be moved to the height of the crate on the right of the screen, and you'll get a rotation which might be more convenient to you :
[[Image:http://jedinight.free.fr/duke/dev/wiki/zoff.png]]
[[Image:zoff.png]]

Revision as of 02:30, 6 November 2005

Eduke32 allows CON-definition of model replacement dynamic rotation for any actor with the members pitch and roll. While the pitch is a rotation about the Y-axis (i.e. would make Duke on the above picture lean forward if given a positive value), the roll makes the model spin around the X-axis. The rotation center is the model center (rendered at the floor by Build) unless you offset it using mdxoff, mdyoff or mdzoff member. That's what would give a 256 roll of the player actor : If you put a -16384 mdzoff before the rotation, the center of the model will be moved to the height of the crate on the right of the screen, and you'll get a rotation which might be more convenient to you :