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

Rename move_and_slide() to something more ' explanatory ' . . #3576

Closed
charlesmlamb opened this issue Nov 20, 2021 · 9 comments
Closed

Rename move_and_slide() to something more ' explanatory ' . . #3576

charlesmlamb opened this issue Nov 20, 2021 · 9 comments
Milestone

Comments

@charlesmlamb
Copy link

charlesmlamb commented Nov 20, 2021

Describe the project you are working on

A barbarian 2.5D game . .

Describe the problem or limitation you are having in your project

It's not really big problem, move_and_slide() doesn't really explain, what it is, sort-of most people just want collision, don't have any good ideas, well maybe call it collide_and_move() . .

Generally, the names don't make sense, they're fairly good, maybe could be made better, that was idea . . .

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Well, hoping someone will look at names for move_and_slide(), also other collision functions, maybe give them slightly better names, so well if one wants to add collision, the names are more user - friendly . . . .

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Not sure, I haven't made the engine, and I think renaming stuff, esp. very important features, is prob. more for people, that have added such amazing features, that's all . . .

If this enhancement will not be used often, can it be worked around with a few lines of script?

I can't do this <3

Is there a reason why this should be core and not an add-on in the asset library?

Not sure, it just is quite confusing, the way it's been named . . .

ADD : By the time I make the controller, character moves . . It already moves, and with bit physics, sort-of slides . . That's where I don't understand, why I want to then add move_and_slide(), well get confused why that's needed, since the character, well already moves, and slides, if one adds bit acceleration, thanks . . . :-OO . . It's just the name, the code itself runs well, <3

@charlesmlamb
Copy link
Author

also, I want to send a big, OFFICIAL apology, I made some videos, that were VERY harshly formulated, bec. I was very upset, I might have to leave the engine, really like, nice software . . :-(( Anyway, bec. I was scared and, quite depressed, it was said the wrong way, I got good help from moderators, and the videos are now much more calm, not so ' upset ' :-OO

Can't apologize enough, it took some attempts, sadly, to find the right words, after that, also the worry was sort-of put into words, the anger and, frustration was gone, I could make some more calm stuff, explain it slower and, it's a ton more understandable . .

Also, if this doesn't belong here, pls. delete this comment, I wanted to help, at same time, I don't know everything and, make mistakes, bec. I don't understand stuff, also, still a beginner, etc . . .

Sorry, for the first videos, they're DELETED, the new ones, I got a ton of help, advice, from moderators, explain it and, I hope it's so much better, well, I'm sorry, big sorry . . ! :-(( . . .

@KoBeWi
Copy link
Member

KoBeWi commented Nov 20, 2021

It would be useful if you also provided some example names that you think would be more clear.

But IMO the names are fine. And if someone doesn't find them descriptive enough, they can always read the doc or a tutorial.

@KoBeWi KoBeWi added this to the 4.0 milestone Nov 20, 2021
@charlesmlamb
Copy link
Author

charlesmlamb commented Nov 21, 2021

Well, maybe collision_detec(), collide_and_glide(), so it's more clear, what one is adding . . . Technically one isn't making the character well move, or as I see it ' glide ' . . :-OO

image

It's more like, collide or, 'respond to physics ', or colliders, or walls . . wall_slide(), don't have any good names, it doesn't make much sense, imo . . .

image

Something with collide, collision_on(), collision_enabled_and_glide() . . I think the people that perhaps made these features, physics in Godot works quite well, never 100 % tested it but, sigh it's a ton of work, I think the people that have made it, might have some better ideas, also, well it's their work, prob. took many years, to code all this stuff . . . .

Technically, the method, doesn't make the character move, it just cause collision detection, after some movement, and the character doesn't really ' slide ', either, on surface, more like bounce or, ' glance ' off . . . It just needs a better name, not sure what . . . .

Add : Slide would be more if one stood on a slope, and started 'sliding' down, or, not sure . . .

@mrjustaguy
Copy link

Eh, Move and Slide perfectly describes it's behavior... You move, and if you collide with something, you slide along it. Move and Collide is already taken for another Kinematic Body type of movement (the one without sliding when you collide)

@charlesmlamb
Copy link
Author

charlesmlamb commented Nov 21, 2021

move implies the functions, moves the character . . It doesn't . . .

And, if one collides with something, a surface, usually rough, say bricks, most stuff, even mirrors, in actual reality, one doesn't ' slide ', but more like ' skoots ' or, bounces, 'bumps' . . So, no the words don't make sense . . .

To make the character move, this is what ACTUALLY does it, still learning, tbc . . .

if Input.is_action_pressed("ui_up"):
translate(Vector3(0,0,1),0,02)

If I'm not mistaken, one can move the character with that, without the move_and_slide() function, so move_and_slide() doesn't move, the character, one adds move_and_slide() after making a movement controller, as far as I know, that is the correct way, to do it, maybe move_and_slide() does actually move the player . . .

The point is not that it doesn't work, the problem is I have no idea why I want to add MOVE_and_slide(), AFTER making the actual movement controller, maybe it makes sense, in a more abstract, low - level code way or, so . . .

Also, move_and_collide() is also wrong, technically what it does is collide_and_stick(), or don't know the best word, but collide_and_glue() . . If one uses move_and_collide(), what really happens is the movement controller, like above, if Input.is_ . . . is where, movement is actually done, as far as I know, adding move_and_collide() can't make the character move, if one presses a button or, in any way do that, except perhaps for rigidbodies, but that would be the physics, or gravity, that moves the player, not the move_and_collide() function, maybe I haven't read, the docus well enough . . . :-OO . . .

@KoBeWi
Copy link
Member

KoBeWi commented Nov 21, 2021

Except move_and_slide DOES move the node. But the velocity you pass to it is multiplied by delta, so maybe that's why you didn't notice the movement. Try move_and_slide(Vector3(0, 100, 0)).

btw when using KinematicBody for character, you rarely move it with translate(), because then it doesn't make sense to use a physics body. You either should use move_and_collide() or move_and_slide() for movement, which every tutorial tells you to do. Before suggesting a rename, you should probably know how the function works 🙃

@charlesmlamb
Copy link
Author

charlesmlamb commented Nov 21, 2021

Ok, thanks for even answering, sigh stuff I suggest is usually noob, or bec. I don't understand what's going on, it still doesn't make sense to me, and I know what they do, it just makes my head sort-of work over time, then again, well I'm noob . . . . !

So, I make a resulting vector, from the input stuff, then save that as Vector3 var, and pass that into move_and_slide(), sigh I use visual script, and the ' default arguments ' don't show so, I just added the function, after making stuff move, and collision well just worked, so I never used the method, to actually move stuff . . ? Ok, so I'm using it wrong, once again, the noob makes a mistake . . . :-(( Thx . . .

@fire-forge
Copy link

maybe call it collide_and_move() . .

There's already a move_and_collide function which works differently from move_and_slide. And I think the docs page for move_and_slide explains what it does well enough.

@Calinou
Copy link
Member

Calinou commented May 10, 2022

Superseded by #2184 and #2867.

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

5 participants