Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- Events
- Farms
- GUI
- Handtools
- I3d
- Materials
- Misc
- Objects
- Placeables
- Player
- Shop
- Sounds
- Specializations
- Triggers
- Utils
- Vehicles
- Weather
Engine v1.7.1.0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- XML
- general
Foundation Reference
IKChains
DescriptionSpecialization loading inverse kinematic (IK) chainsFunctions
onLoad
DescriptionDefinitiononLoad()Code
28 | function IKChains:onLoad(savegame) |
29 | local spec = self.spec_ikChains |
30 | |
31 | spec.chains = {} |
32 | local i = 0 |
33 | while true do |
34 | local key = string.format("vehicle.ikChains.ikChain(%d)", i) |
35 | if not hasXMLProperty(self.xmlFile, key) then |
36 | break |
37 | end |
38 | IKUtil.loadIKChain(self.xmlFile, key, self.components, self.components, spec.chains, self.getParentComponent, self) |
39 | i = i + 1 |
40 | end |
41 | IKUtil.updateAlignNodes(spec.chains, self.getParentComponent, self, nil) |
42 | end |
onUpdate
DescriptionDefinitiononUpdate()Code
46 | function IKChains:onUpdate(dt, isActiveForInput, isActiveForInputIgnoreSelection, isSelected) |
47 | local spec = self.spec_ikChains |
48 | IKUtil.updateIKChains(spec.chains) --, 40, 0.001) |
49 | end |
prerequisitesPresent
DescriptionDefinitionprerequisitesPresent()Code
15 | function IKChains.prerequisitesPresent(specializations) |
16 | return true |
17 | end |
registerEventListeners
DescriptionDefinitionregisterEventListeners()Code
21 | function IKChains.registerEventListeners(vehicleType) |
22 | SpecializationUtil.registerEventListener(vehicleType, "onLoad", IKChains) |
23 | SpecializationUtil.registerEventListener(vehicleType, "onUpdate", IKChains) |
24 | end |