0 votes

if the kinematic player is move_and_slide in floor I must call get_floor_normal method??

in Engine by (190 points)

If you don't know, a vector normal represents the direction perpendicular to a surface ⊥.

1 Answer

0 votes

There's no reason that you must call get_floor_normal. If you've called move_and_slide() and you're currently on the floor (so, is_on_floor returns true) you can call get_floor_normal if you the information it returns if helpful to you. But, again, there's no requirement that it be called.

by (12,280 points)

but then never use this?if for example there is a jump and it returns to the floor,it is necessary to call it

Again, it's never necessary to call it - Godot doesn't care. It's just provides information to you, the programmer, about the normal vector of the colliding floor (assuming there is one). If that info is useful to you, you can call it and use it. If it's not, you don't have to. Godot does not require you to to call it...

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.