View source for Model rotation - EDukeWiki

# View source for Model rotation

← Model rotation

You do not have permission to edit this page, for the following reasons:

- The action you have requested is limited to users in the group: Users.
- You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

[[EDuke32]] allows CON and maphack definition of model replacement dynamic rotation for any [[sprite]], using five members of the [[Members of the spriteext structure|spriteext]] structure: pitch, roll, mdxoff, mdyoff, and mdzoff. '''''pitch''''' and '''''roll''''' contain the values of rotation for the [[actor]]'s model around the X-axis and Y-axis respectively. '''''mdxoff''''', '''''mdyoff''''', and '''''mdzoff''''' offset the rotation center from the model center along the X-, Y-, and Z- axes respectively, as you can see below. The values are expressed in [[Build units]]. (For pitch, -512 looks up while 512 looks down.) ==Tutorial== [[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. 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 sprite: [[Image:roll.png]] If you put a -8192 '''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:zoff.png]] [[Category:Sprite manipulation]]

Return to Model rotation.

Retrieved from "http://wiki.eduke32.com/wiki/Model_rotation"