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

move_and_slide expect only 0 arguments #50400

Closed
AdrianCarmonaRoda opened this issue Jul 12, 2021 · 2 comments
Closed

move_and_slide expect only 0 arguments #50400

AdrianCarmonaRoda opened this issue Jul 12, 2021 · 2 comments

Comments

@AdrianCarmonaRoda
Copy link

Godot version

4.0.dev.calinou [d1f25bb]

System information

Windows 10, Vulkan, GTX 1080

Issue description

When I try to make the CharacterBody2D move with:
get_parent().move_and_slide(Velocity);
(Velocity us a Vector2)
The game crash with this error:
Invalid call to function 'move_and_slide' in base 'characterBody2D ()'. Expected 0 arguments

Steps to reproduce

  1. Add a CharacterBody2D to the Scene tree (and the collider)
  2. Add a GDScript to that node
  3. In the '_physics_process' function add move_and_slide(Vector); with the Vector being a Vector2D with some value
  4. Try to run the game

Minimal reproduction project

Test42D.zip

@YuriSizov
Copy link
Contributor

That is correct, these methods no longer take parameters, see #48908.

@AdrianCarmonaRoda
Copy link
Author

Right! Sorry for the inconvenience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants