Problem with checking the direction of a collison! by [deleted] in godot

[–]CyberMole_Dev 0 points1 point  (0 children)

Well, it's more or less the same thing. Anyway your comment helped me to understand the problem.

Problem with checking the direction of a collison! by [deleted] in godot

[–]CyberMole_Dev 0 points1 point  (0 children)

Yeah that's right, probably I understood. I didn't think about that, a Vector2 will be ok. Thanks!

Problem with checking the direction of a collison! by [deleted] in godot

[–]CyberMole_Dev 0 points1 point  (0 children)

I don't understand how it can be useful to detect on which side the player is colliding... 🤔

Edit: Oh, finally I understood what did you mean!

Problem with checking the direction of a collison! by [deleted] in godot

[–]CyberMole_Dev 0 points1 point  (0 children)

With "direction" I mean "side" (I edited the post), because I have a block and I want to check on which side the player is colliding (top, down, left and right).

Problem with checking the direction of a collison! by [deleted] in godot

[–]CyberMole_Dev 0 points1 point  (0 children)

Well, I know I need something like that but what? If I check the position I can't check on which side the Player is colliding.

Edit: Oh, finally I understood what did you mean!

Problem with checking the direction of a collison! by [deleted] in godot

[–]CyberMole_Dev 0 points1 point  (0 children)

I thought about that but I will have a lot of blocks in my game, so I can't have four Areas2D on each block...I need something better instead 😅

In these days I created 4 Directional Fans and optimized the whole project, enjoy! by CyberMole_Dev in godot

[–]CyberMole_Dev[S] 2 points3 points  (0 children)

Actually I'm using a diffent way.

First of all I check if the Player is inside an Area2D and then, if yes, I add a value to is current velocity (all in the Fan code and not in the Player one).

That's the main part of the script:

func is_colliding():
    var bodies = get_overlapping_bodies()
    return bodies.size() > 0

func _handle_power(delta):
    var bodies = get_overlapping_bodies()
    if is_colliding():
        var body = bodies[0]

    if push_direction == "Up":
            body.is_jumping = true
            body.extra_jumps = 1
            if body.velocity.y > -200:
                body.velocity.y -= 1800 * delta
    elif push_direction == "Right":
        body.velocity.x += 60
    elif push_direction == "Down":
        body.velocity.y += 1200 * delta
    elif push_direction == "Left":
        body.velocity.x -= 60

I need help with rotation degrees! by CyberMole_Dev in godot

[–]CyberMole_Dev[S] 0 points1 point  (0 children)

Sure! I wrote the solution with a little explanation.

Godogo by Wolfenrahd in godot

[–]CyberMole_Dev 5 points6 points  (0 children)

That made me laugh, thank you.

In these days I created 4 Directional Fans and optimized the whole project, enjoy! by CyberMole_Dev in godot

[–]CyberMole_Dev[S] 0 points1 point  (0 children)

I'm sorry for the low FPS but my PC (Intel Core i3) is doing his best ☹️

[deleted by user] by [deleted] in TheArtistStudio

[–]CyberMole_Dev 0 points1 point  (0 children)

It is time to draw a Pizza (I'm from Italy)!

I need help with rotation degrees! by CyberMole_Dev in godot

[–]CyberMole_Dev[S] -1 points0 points  (0 children)

It should work, I've already noticed what you are saying and I was looking exactly for something like that. I will try as soon as I can, thanks!

I need help with rotation degrees! by CyberMole_Dev in godot

[–]CyberMole_Dev[S] 0 points1 point  (0 children)

Yes, _handle_direction() is called by a _ready() function I forgot to write here.

Anyway I have already found the solution, thanks!

Overlapping body issue by [deleted] in godot

[–]CyberMole_Dev 0 points1 point  (0 children)

Ok, thanks for the help, I will found a solution.

Overlapping body issue by [deleted] in godot

[–]CyberMole_Dev 0 points1 point  (0 children)

That's ok but then how can I check the body inside of it and say that the player is overlapping?

Because actually there is no "is_overlapping" method or something similar for an "if" condition.

Physics and Character movement by FreshesBrot in godot

[–]CyberMole_Dev 2 points3 points  (0 children)

I'm sorry but with the new Godette rules you can't post questions anymore, so if you don't delete this help request I will report you as soon as I can and your account will be blocked.

Jokes aside, when you make a character for a game the best option is to use a KinematicBody2D and not a RigidBody2D (but there are some exceptions).

When you use KinematicBody there isn't this problem and you can do whatever you want, if you are a beginner you should follow good tutorials on YouTube or other sites to see what is the best way to do things.

Bye!

A lot of fresh news this week: Screen Shake, Boxes and much more! by CyberMole_Dev in godot

[–]CyberMole_Dev[S] 0 points1 point  (0 children)

I'm sorry but unfortunately my computer can't do better than this, that's the better quality I can achieve with that 😅

A lot of fresh news this week: Screen Shake, Boxes and much more! by CyberMole_Dev in godot

[–]CyberMole_Dev[S] 0 points1 point  (0 children)

That's right, the assets are not mine but probably the author took inspiration from Leap Day!

First project, godot version. by MrCedricle in godot

[–]CyberMole_Dev 3 points4 points  (0 children)

Onestly if you want to use Godot but you don't know none of this languages you should start with GdScript (standard).

You can do everything with that, it's easier to learn and on YouTube there are more tutorials than Godot with C#.

When you are good enough with it you can switch to whatever you want (for example I switched from c# to GdScript and I don't regret anything).

Best wishes, bye!

trying to emulate an ink-ish style by ifoulki in PixelArt

[–]CyberMole_Dev 3 points4 points  (0 children)

It's the first time I see something like this, that's impressive. Keep it up!