You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the Snap Vector is now a Snap Length (Vector3 -> Float), and in my understanding form the docs, it's in the opposite direction of the up_direction. Here is my problem:
In Godot 4 there is no way to do this, because it's somehow handled behind the scenes and these are all the properties
and if I refer to some of the docs (I don't know if they are up-to-date), this snap_length is the opposite direction of up_direction, but if I mess with it like this:
ifis_on_floor():
up_direction=get_floor_normal()
my controller doesn't snap to the floor when the floor normal changes and I "rocket" myself into the air
2022-04-09_20-59-22.mp4
Is there any official demo or example to see how it should be handled or somebody who knows about physics in Godot to tell me what am I doing wrong.
In the Godot 3 version, the logic is in the res://Player/Player.gdpath.
In the Godot 4 version, the logic is in the res://Player/MovementController.gdpath
Don't know what I was doing at the time of writing this issue but I tested it with alpha 7 and the issues described are not present. I was like oh cool, decided to try with alpha 6 just for fun and it worked there too, so no idea what I was doing.
Now I just set the snap_length to 0.5 and constant_speed to true (optional) and now it's working. I'm pretty sure I tried the same thing last time before going deep into some custom solution...
And for people who want more control over the floor angle handling and such there are nice methods such as get_floor_normal() and get_floor_angle() and many more!
Godot version
4.0.alpha6
System information
Windows 10
Issue description
I began rewriting my First Person Starter in Godot 4.
I noticed that the Snap Vector is now a Snap Length (Vector3 -> Float), and in my understanding form the docs, it's in the opposite direction of the
up_direction
. Here is my problem:2022-04-09_20-51-28.mp4
In Godot 3.x i did something like
In Godot 4 there is no way to do this, because it's somehow handled behind the scenes and these are all the properties
and if I refer to some of the docs (I don't know if they are up-to-date), this
snap_length
is the opposite direction ofup_direction
, but if I mess with it like this:my controller doesn't snap to the floor when the floor normal changes and I "rocket" myself into the air
2022-04-09_20-59-22.mp4
Is there any official demo or example to see how it should be handled or somebody who knows about physics in Godot to tell me what am I doing wrong.
Steps to reproduce
godot4
branchIn the Godot 3 version, the logic is in the
res://Player/Player.gd
path.In the Godot 4 version, the logic is in the
res://Player/MovementController.gd
pathMinimal reproduction project
godot-FirstPersonStarter-godot4.zip
or
https://github.com/Whimfoome/godot-FirstPersonStarter/tree/godot4
The text was updated successfully, but these errors were encountered: