-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add a Sigmoid function to GDScript. #12
Add a Sigmoid function to GDScript. #12
Comments
I think this and many other functions can be bundled in a Math or a Noise class |
Oh, absolutely, and GDScript already has functions like |
Please refrain using ALL CAPS in issue titles. |
Well, maybe the builtin function could be named |
Bezier curves do not approach their bounds asymptotically, whereas sigmoid functions do. This means that the higher the value you plug into a sigmoid, the closer it reaches the bound, but without touching -- for the bezier curve, it will reach that limit. For something like weapon sway, that will create an effect where the model's movement appears to hit a wall, whereas a sigmoid function will appear to meet greater and greater resistance. |
makes sense, sort of like an ease-in and ease-out. |
Does this have a related Godot proposal issue? |
No results for "sigmoid" in issues or PRs, open or closed. Seems like fair game for us |
I kinda would like this to be thrown upstream first, but that would depend on what @8bitprodigy wants, or in the case of Redot-Engine/redot-engine#148 what @NickUfer also wants, if they don't want it upstream then we'll need to merge it in a way to minimize merge conflicts with Godot. |
Whatever works for y'all. |
I posted on the PR for this, we revised this policy as a team due to a bunch of concerns. I need to check on the PR, we were just waiting on some small changes and then a squash afterwards iirc |
He'll yeha! |
Tested versions
N/A
System information
N/A
Issue description
The sigmoid function is one that follows a roughly
S
-shaped curve, asymptotically reaching an upper and lower bound. Such a function would work great for weapon sway wherein the magnitude of the mouse/joystick movement is mapped to a position determined through the sigmoid function.Steps to reproduce
N/A
Minimal reproduction project (MRP)
Here is a GDScript implementation of the sigmoid function:
The text was updated successfully, but these errors were encountered: