This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| dragengine:modules:dragonscript:behavior_actorik [2025/06/23 16:11] – [controllerIKRotation] dragonlord | dragengine:modules:dragonscript:behavior_actorik [2025/06/23 16:14] (current) – [Element Class Example] dragonlord | ||
|---|---|---|---|
| Line 119: | Line 119: | ||
| | | ||
| - | public | + | func new() super(" |
| // the base actor class creates an actor animated behavior we can use | // the base actor class creates an actor animated behavior we can use | ||
| Line 134: | Line 134: | ||
| | | ||
| - | public | + | func new() |
| end | end | ||
| Line 145: | Line 145: | ||
| // enable IK while this action is assigned to an actor then disable it again. | // enable IK while this action is assigned to an actor then disable it again. | ||
| // using disable() instead of setEnabled(false) also clears the target | // using disable() instead of setEnabled(false) also clears the target | ||
| - | public | + | func void activate() |
| super.activate() | super.activate() | ||
| actorIK.setTarget(targetElementToTouch) | actorIK.setTarget(targetElementToTouch) | ||
| Line 151: | Line 151: | ||
| end | end | ||
| - | public | + | func void deactivate() |
| actorIK.disable() | actorIK.disable() | ||
| super.deactivate() | super.deactivate() | ||
| Line 166: | Line 166: | ||
| | | ||
| - | public | + | func new() super(" |
| // the base actor class creates an actor animated behavior we can use | // the base actor class creates an actor animated behavior we can use | ||
| Line 190: | Line 190: | ||
| | | ||
| - | public | + | func new() |
| end | end | ||
| Line 205: | Line 205: | ||
| // from the point of view of the element. the target position is always | // from the point of view of the element. the target position is always | ||
| // relative to the target element. | // relative to the target element. | ||
| - | public | + | func void activate() |
| super.activate() | super.activate() | ||
| | | ||
| Line 217: | Line 217: | ||
| end | end | ||
| - | public | + | func void deactivate() |
| actorIKLeft.disable() | actorIKLeft.disable() | ||
| actorIKRight.disable() | actorIKRight.disable() | ||