• 1 Votes
    2 Posts
    201 Views

    僕も日本人です。

  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    1 Posts
    951 Views
    No one has replied
  • 0 Votes
    2 Posts
    1k Views

    I can help! I'm really good with building! In 2d and 3d, and I know GDScript

  • 0 Votes
    1 Posts
    280 Views
    No one has replied
  • 0 Votes
    2 Posts
    383 Views

    I would suggest not using GDScript for that, but instead just make the camera a child node of the object it should follow.

  • Basic Layouts

    Unsolved Godot Forums
    2 Votes
    42 Posts
    8k Views
  • 0 Votes
    1 Posts
    785 Views
    No one has replied
  • 0 Votes
    1 Posts
    121 Views
    No one has replied
  • 0 Votes
    1 Posts
    361 Views
    No one has replied
  • 0 Votes
    1 Posts
    202 Views
    No one has replied
  • 0 Votes
    2 Posts
    1k Views

    Hi Kymoh,

    You have been absolutely fantastic with your support and it has been hugely appreciated.

  • 0 Votes
    3 Posts
    552 Views

    I made a code to make the item move towards the closest point on the circle.

    Basically, I noticed that if you drew an imaginary line from the center of the circle to the item, the line eventually touches the closest point on the circle.
    Since want to find the slope of that line, use arctan(y/x) to find the angle. With the slope, you can then find the x and y coordinates of the point on the circle. This is done by cos(angle)radius and sin(angle)radius.
    Now that you have the desired x and y coordinates, simply move the item towards that direction.

    Note that since Godot measures x and y from the top left corner, you have to go through weird conversions to make it work with trig:

    extends Node2D var radius = 250 var phase = 0 var speed = 100 var angular_speed = .2 var clockwise = -1 #-1 for clockwise, 1 for counter-clockwise var x var y var angle var xgoal var ygoal var movement func _ready(): position = Vector2(randf_range(0,get_viewport_rect().size.x),randf_range(0,get_viewport_rect().size.y)) set_xy() angle = atan2(y, x) #find the angle from the center of the circle to the position xgoal = radius*cos(angle) #using that angle, find the coordinates of where that would be on the circle ygoal = radius*sin(angle) movement = Vector2(xgoal - x, -(ygoal - y)).normalized() #direction the item should travel func set_xy(): #sets the x and y coordinates, then offsets the values so that (0, 0) is at the center of the screen (instead of the top left ocrner) x = position.x - get_viewport_rect().size.x/2 y = -(position.y - get_viewport_rect().size.y/2)

    Alright, I hope it makes sense and works for you. I also completed the second half of the code.

    This part checks if the item is close enough to the edge, then activates the next phase.
    In the second phase, the code simply increases the angle slowly, then converts the angle to the coordinates on the circle.
    The code should work if you just add it on to the end of the first half:

    func _process(delta): if phase == 0: phase0(delta) if phase == 1: phase1(delta) func phase0(delta): #moving the item towards the edge of the circle. End this phase once close enough to the edge position += movement * speed * delta set_xy() #(next several lines) measuring how far it is from the edge, then go to next phase if it's close enough var distance = Vector2(xgoal-x, -(ygoal-y)).length() if distance<5: phase = 1 func phase1(delta): #circling around after reaching the edge angle += angular_speed * clockwise * delta #increase the angle slowly xgoal = radius * cos(angle) #(next several lines) finding and converting the angle to coordinates. ygoal = -radius * sin(angle) xgoal += get_viewport_rect().size.x/2 ygoal += get_viewport_rect().size.y/2 position = Vector2(xgoal, ygoal)
  • 1 Votes
    2 Posts
    430 Views

    The server maintenance has been completed. The server is now relocated to the new location. Things should be back to normal. If you notice any issues, please let me know. Thank you for your patience.

    Known Issues:

    Some images might not load properly, please clear your browser cache if you encounter this issue. Some users might experience slow loading times, this should be resolved within the next 24 hours as the DNS propagates across the globe. There's an issue with SMTP server, causing emails not to be sent. Therefore any email related features will not work until this is resolved. I'll work on it by the next week. If you notice any other issues, please let me know. Thank you.
  • 8 Votes
    11 Posts
    82k Views

    This is an excellent guide though I do feel like one thing was missed: annotations. Would you mind adding an annotation section? I feel like they're a very important aspect.

  • New Game Idea

    Dev Logs
    1 Votes
    2 Posts
    1k Views

    Being able to hand-draw your weapons sounds like an awesome idea! It would be difficult though.

    A simple method that comes to my mind is to use a variable such as a Vector2 List, and record where your mouse was drawing. So for each line you would store two Vector2 positions in order to keep track where the line starts and ends. Then, during the game, you would "redraw" the weapon and offset it depending on the player location.

    A second method is to use image files that you put into the game. The person playing can draw a weapon, whether that be in an in-game editor or on their own drawing app. Then the drawing would go into the game files so that the game can find it and use it.

    Third method is not quite drawing your weapons, but a bit similar. You just pre-draw several different gun parts, then allow the player to switch between them freely. With enough parts, the player can still design whatever they want, and it would make stats really easy to make. I've actually made a small game that uses this method, so I can confirm it's easier than making a drawing editor.

    It all depends on what exactly you have planned. The first method is easy for the player but might be hard to make. The second method gives a ton of artistic freedom, but can be confusing for the player to use. The third method is really easy for the player, but takes away the freedom to draw.

  • 0 Votes
    2 Posts
    232 Views

    I'm not sure what your problem is, I tested several buttons and they didn't have issues. If you send a photo or video of your game and code, I might be able to see what went wrong.
    Other than that, all I can tell you is to make sure all of your buttons are identical, just to narrow down the inconsistencies.

  • 0 Votes
    1 Posts
    92 Views
    No one has replied
  • 0 Votes
    2 Posts
    153 Views

    I have the same problem. First godot 4 doesn't exist in the play store but godot 3 do . And when i try to create and edit the project it chow me the godot logo but it crach and say godot has stopped. I been really happy when i heard that godot is in mobile but now not

  • 0 Votes
    1 Posts
    125 Views
    No one has replied