This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
ofp:modeling:animations [2007-07-10 09:52] 127.0.0.1 external edit |
ofp:modeling:animations [2016-11-04 22:21] snakeman moved images from nekromantix to this domain. |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Animations ====== | ====== Animations ====== | ||
- | {{ http://tactical.nekromantix.com/images/wiki/AnimatedDoors.jpg}} | + | {{ http://pmc.editing.wiki/images/AnimatedDoors.jpg}} |
This articles talks about simple, single-p3d animations, where parts of a model rotate around an axis (like a car door, or a tank turret). | This articles talks about simple, single-p3d animations, where parts of a model rotate around an axis (like a car door, or a tank turret). | ||
Line 19: | Line 19: | ||
The following example is for an object that has been named 'door', which turns around an axis named 'door axis'. The 'action point' (the position the player has to be close to, in order to be able to activate this animation) is called 'doorbell'. | The following example is for an object that has been named 'door', which turns around an axis named 'door axis'. The 'action point' (the position the player has to be close to, in order to be able to activate this animation) is called 'doorbell'. | ||
- | <code> | + | <code cpp> |
class Animations | class Animations | ||
{ | { | ||
Line 29: | Line 29: | ||
axis="door axis"; // the name of the axis | axis="door axis"; // the name of the axis | ||
angle0=0 // the start angle | angle0=0 // the start angle | ||
- | angle1=-2.0; // the end angle, in radians (= degrees/57.3 = degrees * 180/π) | + | angle1=-2.0; // the end angle, in radians (= degrees/57.3 = degrees * 180/?) |
}; | }; | ||
}; | }; | ||
</code> | </code> | ||
- | <code> | + | <code cpp> |
class UserActions | class UserActions | ||
{ | { |