-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SpringBoneSimulator3D to wiggle chained bones #101409
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="SpringBoneCollision3D" inherits="Node3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> | ||
<brief_description> | ||
A base class of the collision that interacts with [SpringBoneSimulator3D]. | ||
</brief_description> | ||
<description> | ||
A collision can be a child of [SpringBoneSimulator3D]. If it is not a child of [SpringBoneSimulator3D], it has no effect. | ||
The colliding and sliding are done in the [SpringBoneSimulator3D]'s modification process in order of its collision list which is set by [method SpringBoneSimulator3D.set_collision_path]. If [method SpringBoneSimulator3D.are_all_child_collisions_enabled] is [code]true[/code], the order matches [SceneTree]. | ||
If [member bone] is set, it synchronizes with the bone pose of the ancestor [Skeleton3D], which is done in before the [SpringBoneSimulator3D]'s modification process as the pre-process. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="get_skeleton" qualifiers="const"> | ||
<return type="Skeleton3D" /> | ||
<description> | ||
Get parent [Skeleton3D] node of the parent [SpringBoneSimulator3D] if found. | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="bone" type="int" setter="set_bone" getter="get_bone" default="-1"> | ||
The index of the attached bone. | ||
</member> | ||
<member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default=""""> | ||
The name of the attached bone. | ||
</member> | ||
<member name="position_offset" type="Vector3" setter="set_position_offset" getter="get_position_offset"> | ||
The offset of the position from [Skeleton3D]'s [member bone] pose position. | ||
</member> | ||
<member name="rotation_offset" type="Quaternion" setter="set_rotation_offset" getter="get_rotation_offset"> | ||
The offset of the rotation from [Skeleton3D]'s [member bone] pose rotation. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="SpringBoneCollisionCapsule3D" inherits="SpringBoneCollision3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> | ||
<brief_description> | ||
A capsule shape collision that interacts with [SpringBoneSimulator3D]. | ||
</brief_description> | ||
<description> | ||
A capsule shape collision that interacts with [SpringBoneSimulator3D]. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<members> | ||
<member name="height" type="float" setter="set_height" getter="get_height" default="0.5"> | ||
The capsule's height. | ||
</member> | ||
<member name="inside" type="bool" setter="set_inside" getter="is_inside" default="false"> | ||
If [code]true[/code], the collision acts to trap the joint within the collision. | ||
</member> | ||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.1"> | ||
The capsule's radius. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="SpringBoneCollisionPlane3D" inherits="SpringBoneCollision3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> | ||
<brief_description> | ||
A infinite plane collision that interacts with [SpringBoneSimulator3D]. | ||
</brief_description> | ||
<description> | ||
A infinite plane collision that interacts with [SpringBoneSimulator3D]. It is an infinite size XZ plane, and the +Y direction is treated as normal. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="SpringBoneCollisionSphere3D" inherits="SpringBoneCollision3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> | ||
<brief_description> | ||
A sphere shape collision that interacts with [SpringBoneSimulator3D]. | ||
</brief_description> | ||
<description> | ||
A sphere shape collision that interacts with [SpringBoneSimulator3D]. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<members> | ||
<member name="inside" type="bool" setter="set_inside" getter="is_inside" default="false"> | ||
If [code]true[/code], the collision acts to trap the joint within the collision. | ||
</member> | ||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.1"> | ||
The sphere's radius. | ||
</member> | ||
</members> | ||
</class> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mickeon I foresee you might want to do a follow-up PR to improve the flow of the docs added in this PR (all
SpringBone*
classes).