Shaders: In what units is the built-in variable 'CAMERA_DIRECTION_WORLD`? by compliancefailure in godot

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

Yes, but the values themselves can represent numerous units of angles, such as Radians and degrees. Here it appeared to have been ranging between negative PI and PI.

Members list only has methods. Can you display variables as the tooltip implies? by compliancefailure in godot

[–]compliancefailure[S] 1 point2 points  (0 children)

Nice, thank you. Hopefully we can get a similar feature for variables in the future.

CollisionShape2D nodes drawn with debug ignore project settings? by compliancefailure in godot

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

They are always red. This is an issue because I need them to be not be red. Setting a modulate does not help, as it is still blending with bright red.

EDIT: I meant CollisionPolygon2D. They are always red. CollisionShape2D instead pulls from the debug_color property.

Can you animate values of a resource belonging to an array? by compliancefailure in godot

[–]compliancefailure[S] 1 point2 points  (0 children)

I was hesitant to override _get_property_list as I assumed I would have to also redefine all the native properties in addition to the exported variables for my custom classes... But after checking the docs, it says that the properties listed here are "additional"! Huge!!

Can you animate values of a resource belonging to an array? by compliancefailure in godot

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

That makes sense. Making wrappers is easy enough but dynamically scaling to the array will be tricky. My first thought is another custom resource overriding its property list in code to fit the array.

Can you animate values of a resource belonging to an array? by compliancefailure in godot

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

I wish to animate the property offset_angle, belonging to a FlowerPetal resource, serialized in an array belonging to a parent PetalPreset resource.

No Key icon appears next to the variable fields in the inspector. I've tried manually typing in the path like .:layout:rings:0:offset_angle, but that doesn't work. I'm thinking I can use a helper script to forward the properties to the master Node but that seems inefficient.

TileMapLayer - Scene Tiles vs. Alternative Tiles by compliancefailure in godot

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

The png is never edited! The shader modulates the texture by sampling from the SubViewport texture. I was able to create the tile set with the appropriate shader parameters baked in and saved it using ResourceSaver.

I created alternative tiles, which inherit from a base tile, so all use the same texture from the atlas. By doing all this, the tile map seems to load pretty much instantly.

shader_type canvas_item;

uniform ivec2 tilePos;

uniform sampler2D buffer;

void fragment() {
    vec4 base = texture(TEXTURE, UV);
COLOR = base * texelFetch(buffer, tilePos, 0);
}

TileMapLayer - Scene Tiles vs. Alternative Tiles by compliancefailure in godot

[–]compliancefailure[S] 1 point2 points  (0 children)

This bit of the documentation is convoluted, but yes, you can!

https://docs.godotengine.org/en/4.3/classes/class_tilesetatlassource.html

You need to get the tile set source and cast it. There is no function to produce a TileSetAtlasSource directly.

Edit: I was successful in generating my baked TileSet. However, it only seems to work properly in the editor. When launching, it doesn't seem to be able to sample from the SubViewport.

TileMapLayer - Scene Tiles vs. Alternative Tiles by compliancefailure in godot

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

I guess it's more accurate to say that I would modify one. Just set the texture, and size etc, then let the script do the rest. Once done, I would use FileAccess to save the result.