summaryrefslogtreecommitdiff
path: root/doc/classes/SkeletonModification3D.xml
blob: 90ccd8f42ee88e3fd71c4bcf61acb2e76b58186b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SkeletonModification3D" inherits="Resource" version="4.0">
	<brief_description>
		A resource that operates on bones in a [Skeleton3D].
	</brief_description>
	<description>
		This resource provides an interface that can be expanded so code that operates on bones in a [Skeleton3D] can be mixed and matched together to create complex interactions.
		This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses.
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="_execute" qualifiers="virtual">
			<return type="void" />
			<argument index="0" name="delta" type="float" />
			<description>
				Executes the given modification. This is where the modification performs whatever function it is designed to do.
			</description>
		</method>
		<method name="_setup_modification" qualifiers="virtual">
			<return type="void" />
			<argument index="0" name="modification_stack" type="SkeletonModificationStack3D" />
			<description>
				Sets up the modification so it can be executed. This function should be called automatically by the [SkeletonModificationStack3D] containing this modification.
				If you need to initialize a modification before use, this is the place to do it!
			</description>
		</method>
		<method name="clamp_angle">
			<return type="float" />
			<argument index="0" name="angle" type="float" />
			<argument index="1" name="min" type="float" />
			<argument index="2" name="max" type="float" />
			<argument index="3" name="invert" type="bool" />
			<description>
				Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds.
			</description>
		</method>
		<method name="get_is_setup" qualifiers="const">
			<return type="bool" />
			<description>
				Returns whether this modification has been successfully setup or not.
			</description>
		</method>
		<method name="get_modification_stack">
			<return type="SkeletonModificationStack3D" />
			<description>
				Returns the [SkeletonModificationStack3D] that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on.
			</description>
		</method>
		<method name="set_is_setup">
			<return type="void" />
			<argument index="0" name="is_setup" type="bool" />
			<description>
				Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack3D] the modification is bound to should handle setting the modification up.
			</description>
		</method>
	</methods>
	<members>
		<member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="true">
			When true, the modification's [method _execute] function will be called by the [SkeletonModificationStack3D].
		</member>
		<member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0">
			The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes.
		</member>
	</members>
</class>