Ask

64 Topics 173 Posts
  • 1 Votes
    2 Posts
    160 Views
    No one has replied
  • 1 Votes
    2 Posts
    1k Views

    Figured it out. Here's the code for anyone interested:

    _physics_process(delta: float): var root_motion := animation_tree.get_root_motion_position() var input_direction := Input.get_vector("left", "right", "forward", "back") var direction := transform.basis * Vector3(input_direction.x, 0, input_direction.y) var current_rotation := transform.basis.get_rotation_quaternion().normalized() var horizontal_rotation = camera_rig.global_transform.basis.get_euler().y var horizontal_velocity = current_rotation * root_motion / delta direction = Vector3(input_direction.x, 0, input_direction.y) direction = direction.rotated(Vector3.UP, horizontal_rotation).normalized() velocity = Vector3(horizontal_velocity.x, velocity.y, horizontal_velocity.z) if direction: rotation.y = lerp_angle(rotation.y, atan2(direction.x, direction.z), lerp_weight)
  • Learning problem for beginner

    1 Votes
    2 Posts
    98 Views
  • 1 Votes
    2 Posts
    390 Views

    Solved this one after enough coffee and cigarettes. It ended up being daft. The offending function:

    func buffer_from_2d_array(array_2d: Array ) -> PackedByteArray: var img_buffer: PackedByteArray = [] img_buffer.resize(width * height) var idx: int = 0 for x in range(width): for y in range(height): img_buffer[idx] = array_2d[x][y] * 255 # *255 to make the values sensible for the image idx += 1 return img_buffer

    Which now, correctly, does not iterate for size of the image in either axis but the actual count of elements that the byte array building the image depends upon:

    func buffer_from_2d_array(array_2d: Array, size: Vector2i) -> PackedByteArray: var img_buffer: PackedByteArray = [] img_buffer.resize(size.x * size.y) var idx: int = 0 for cell in array_2d: for value in cell: img_buffer[idx] = value * 255 # *255 to make the values sensible for the image idx += 1 return img_buffer

    @TC93DEV said in 4.1.1 stable: noise generation; rectangular dimension issues:

    I am pretty sure I'm screwing up in either accessing the 2D array or populating the PackedByteArray for the Image.create_from_data() function.

    /aggressivenodding

    noisy_fix.png

  • Problem when exporting a c# project

    Unsolved
    1 Votes
    6 Posts
    1k Views

    @Семён-Дружинин said in Problem when exporting a c# project:

    Forgive me, I am very bad at English and the translator does not work very well with such texts.

    It's all good. I will try to be more concise instead of rambling!

    Hopefully we have found the issue, or at least we have found two issues.

    This issue is related to rcedit.

    modules/mono/glue/runtime_interop.cpp:1324 - Failed to export project: Failed to build project. Could not create child process: rcedit D:/Godot/Proxima-B2/Build/Proxima-B.exe --set-icon C:/Users/Семён/AppData/Local/Godot/_rcedit.ico --set-version-string CompanyName beta-for-leath0r --set-version-string ProductName beta-for-leath0r --set-version-string FileDescription beta-for-leath0r --set-version-string LegalCopyright beta-for-leath0r --set-version-string LegalTrademarks beta-for-leath0r editor/export/editor_export_platform.h:175 - Изменение ресурсов: Не удалось запустить исполняемый файл rcedit. Настройте путь rcedit в настройках редактора (Экспорт > Windows > rcedit) или отключите "Приложение > Изменить ресурсы" в пресете экспорта. Could not create child process: rcedit D:/Godot/Proxima-B2/Build/Proxima-B.console.exe --set-icon C:/Users/Семён/AppData/Local/Godot/_rcedit.ico --set-version-string CompanyName beta-for-leath0r --set-version-string ProductName beta-for-leath0r --set-version-string FileDescription beta-for-leath0r --set-version-string LegalCopyright beta-for-leath0r --set-version-string LegalTrademarks beta-for-leath0r editor/export/editor_export_platform.h:175 - Изменение ресурсов: Не удалось запустить исполняемый файл rcedit. Настройте путь rcedit в настройках редактора (Экспорт > Windows > rcedit) или отключите "Приложение > Изменить ресурсы" в пресете экспорта.

    Godot is missing rcedit. To set custom icons among other things in the build process you need rcedit installed.

    docs.godotengine.org/en/stable/tutorials/export/changing_application_icon_for_windows.html

    github.com/electron/rcedit/releases

    Point to the rcedit.exe at Editor Settings -> General -> Export -> Windows -> rcedit.

    6c98fe54-207e-4c0f-961f-d2a6550cdc9b-image.png

    The second, different issue:

    10137c8e-0e57-44c7-872f-499bf587573e-image.png

    There is a resource in the project using a Cubemap Array which is not supported in Compatibility mode; this will need to be removed or you'll need to use Forward+ rendering.

    Link Preview Image Internal rendering architecture

    This page is a high-level overview of Godot 4's internal renderer design. It does not apply to previous Godot versions. The goal of this page is to document design decisions taken to best suit Godo...

    favicon

    Godot Engine documentation (docs.godotengine.org)

    Starting with these two things will get you on the right track mate. Rcedit is the easier of the two to fix so perhaps start with that.

    Good luck, let me know how you go!

  • Missing Signal Connection Warning

    1 Votes
    4 Posts
    217 Views

    @MSI-Emperium It might help if you can explicitly describe the error you're getting, as in, copy and paste it here, or perhaps a screenshot.

    @MSI-Emperium said in Missing Signal Connection Warning:

    I do my training through Godot docs.

    If you mean https://docs.godotengine.org/en/stable/index.html, it contains documentation for every version of the engine so we don't really know whether you're using the current version or not. What version pops up when you go to Help -> About Godot from the editor?

  • 0 Votes
    6 Posts
    742 Views

    @MaplewoodStreet Darn, not sure how to fix that, sorry.

  • 1 Votes
    8 Posts
    564 Views

    You're very welcome! I'm glad I could help you.

  • .TSCN file loading error

    1 Votes
    1 Posts
    211 Views
    No one has replied
  • 1 Votes
    2 Posts
    79 Views

    Without knowing more about the steps that you've did to get into that point, it's hard to point what's wrong.

    But judging from your screenshot, those Sprite2D should've been showing. but do you know why your back color isn't grey colored?
    image.png

  • 1 Votes
    6 Posts
    241 Views

    @Funky-Gaming Web version is like that, (seems like not responding) even if you browse it in PC browser. Try it again and give it about 10 minutes and see if anything shows up.

    Yes you can submit it as an issue here, make sure you include:

    Your phone model Version of Godot you were using The sample meshes that you were trying to get into, but giving you problem Screenshot if applicable
  • 0 Votes
    1 Posts
    71 Views
    No one has replied
  • 1 Votes
    3 Posts
    684 Views

    @altria "Thank you for all the great ideas, especially the Visible Collision Shapes which I can immediately implement. When I watch other YouTube videos, it seems like they simply click the onewayCollision button and it works flawlessly. I'm not sure what's wrong with mine and it's quite puzzling."

  • This topic is deleted!

    0 Votes
    1 Posts
    10 Views
    No one has replied
  • 2D top down collision behavior

    Solved
    1 Votes
    4 Posts
    980 Views

    Ok so I figured it out. The reason it was eluding me was that it was two separate things which led me to all the wrong conclusions. .
    First setting inertia back to 0 (which makes it automatically compute inertia and clearly that's good enough)
    Second one of the objects I was colliding with for testing had a strange wonky collision box. It was a slight rhombus although I saw nothing in its inspector to indicate why, and it was slightly scaled up. I am kind of amazed how such a seemingly tiny change had made that object into something that would teleport my tank to space every time I touched one of its corners (not in the video).

  • 0 Votes
    5 Posts
    2k Views

    Yes, you can use get_global_mouse_pos() to get the global position of the mouse

  • 2 Votes
    1 Posts
    856 Views
    No one has replied
  • Tips for an RPG project

    1 Votes
    4 Posts
    153 Views

    Tux is a loveable mascot. Wishing you well with that!

  • 0 Votes
    5 Posts
    319 Views

    Hi @altria I ended up reloading the previous commit from before I added the wasp to the project, then re-imported the wasp. Seems to be working okay now. I thankfully didn't lose much progress. I suspect there was some sort of corruption during the initial import. Thank you for taking a look.

  • Floor mesh bug

    0 Votes
    5 Posts
    121 Views

    okidokie! Thanks for the reply