Skip to content
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

Expose low-level properties of AnimationTree #6807

Open
Daylily-Zeleen opened this issue May 4, 2023 · 2 comments · May be fixed by godotengine/godot#77395
Open

Expose low-level properties of AnimationTree #6807

Daylily-Zeleen opened this issue May 4, 2023 · 2 comments · May be fixed by godotengine/godot#77395

Comments

@Daylily-Zeleen
Copy link

Daylily-Zeleen commented May 4, 2023

Describe the project you are working on

An rollbackable 3D Game.

Describe the problem or limitation you are having in your project

Hitting detection boxs of character are bind with skeleton, and we can't save AnimationTree's properties as state and load the state to support rollback.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

We can realize the rollback of animation by providing apis to get and set private properties of AnimationTree.

Because of hitting detection often work with skeleton in 3D game, this feature is beneficial to do prediction with physics simulation.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Provide a series of get and set methods of private properties, and register them as property in ClassDB (maybe add a prefix "advance_" for each property is better).

If this enhancement will not be used often, can it be worked around with a few lines of script?

We can't manipulate private properties of AnimationTree in script.

Is there a reason why this should be core and not an add-on in the asset library?

We can't implement a rollbackable AnimationTree by inheriting.

@Calinou
Copy link
Member

Calinou commented May 4, 2023

@fire
Copy link
Member

fire commented May 22, 2023

To implement rollback features, create a secure API that manages rollbacks without compromising the internal AnimationTree properties.

Extend the AnimationTree class with an AnimationTreeRecorder class, including "buffer time" and "rollback time" properties for recording and rolling back states.

Exposing AnimationTree properties is not accepted, but integrating an AnimationTreeRecorder class into the core may be more favourable.

See godotengine/godot#77347 (comment) for the original comment.

@Calinou Calinou changed the title Expose low level properties of AnimationTree. Expose low-level properties of AnimationTree May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants