-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Allow to apply the angular velocity of a moving platform #63650
Allow to apply the angular velocity of a moving platform #63650
Conversation
Just making a note, but it seems like this should relate to Velocity On Leave, which is set using a enum, while this which relates to Rotational Velocity is set using layers, which is like how the walls and floors are set. |
9836b29
to
c7c1b3d
Compare
@Diddykonga In fact it's just that rotation is a boolean (yes or no, 2 values), whereas for velocity when leaving the platform there are 3 values (originally there were even more). |
I'm curious. Can you go into more detail about when it might not be desired for the character to follow the platform's rotation? I would expect the floor to act like an actual floor and the character to always rotate with it. I think having yet another layer mask for this is pretty inconvenient. Other than that I think the PR is great and adds a very important feature! |
Would it be possible to do this instead by implementing a |
@and-rad Nothing specific, I was thinking about vertical rotations (or to make old school FPS) @rburing The rotation is retrieved with |
@rburing @fabriceci the method that get the velocity at a point does consider the angular velocity, the main problem with this is that most implementations will just rotate the mesh based on the direction and not really the collider or body. Additionally, since most character control implementations will determine the facing direction based on velocity, this may conflict with it. IMO, this would probably work better if the user could retrieve this angle after calling move_and_slide and decide what to do with it. |
c7c1b3d
to
3f9db7b
Compare
@reduz I added a method |
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.
Looks good to me.
Thanks! |
I thought it was a bug but it was just more a limitation because it's not always wanted. This option adds a layer that allows to indicate if we have to apply or not the angular speed of a platform to the CharacterBody (as for the others)
EDIT: I added as reduz suggested a method to retrieve the angular velocity of the platform.
rotation.mp4