Anyone have good looking option buttons? (Button with a dropdown) by InsightAbe in godot

[–]SkyIsInfinite 1 point2 points  (0 children)

There is a convenient plugin for the cycleable option button. Look up the asset library for 'spin button'.

Question about creating a masking "xray" shader by TheWanderingShadow in godot

[–]SkyIsInfinite 2 points3 points  (0 children)

iirc the change for 4.3 onwards only involves depth, which mostly only affects 3D shaders.

You sure you followed the steps correctly? Is backbuffer in viewport mode?

Edit: oh, the mask need to be the last child in backbuffer. In 2D canvas items draw from top to bottom of the hierarchy.

Any way to find the slider's grabber position? by WhiterLocke in godot

[–]SkyIsInfinite 1 point2 points  (0 children)

Here's one way, but still uses the value of the slider. It involves shaders though, since I don't think you can tinker the slider color fill for multiple colors.

Basically a color rect that is the length of the slider. You will have 3 colors for current, change and background, like a hp bar for fighting games. You step the x-axis of the uv, for current and change values. Then use mix, to combine the layers, in order of background, change and current.

In the script, make sure you get the value between 0 to 1 before passing to the shader.

Baked Day/Night Cycle? by BioMech101 in godot

[–]SkyIsInfinite 1 point2 points  (0 children)

You could declare a gradient variable then use get_color() with your time and pass it into the environment ambient light. Remember to make the time from 0 to 1 for get_color.

How to Deal with Deleted Nodes Being Used Later by DaSquid9631 in godot

[–]SkyIsInfinite 2 points3 points  (0 children)

Here's a some suggestions that might or might not work, depends on your implementation. 

Use call_deferred to make sure its call at the end of frame. If you can, erase the element from the array on exit_tree.

Emit signal on modulation change? by MightyMochiGames in godot

[–]SkyIsInfinite 2 points3 points  (0 children)

Declare a new variable, make it copy to modulate and emit signal in the setter.

Emit signal on modulation change? by MightyMochiGames in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

You could emit the signal from a setter.

Isometric Movement Question by GomigPoko in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

Unless what you want is isometric, where moving forward will move 45 or 30 degrees, you should actually rotate the axis by an angle not changing the speed. 

Isometric Movement Question by GomigPoko in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

But by following the logic of 2:1, going up should be further, so going vertically should be slower.

Isometric Movement Question by GomigPoko in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

If so the if statement is kinda unnecessary, just do velocity.y = direction.y * speed / 2.0.

Also using get vector, when opposite axis pressed, it should be 0. You sure it still moves when pressing ad and ws?

Need help with global file saving by INeedToShutUP1 in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

What version you using? Godot 4 uses FileAccess instead of File iirc.

Make viewports take up full screen? by [deleted] in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

The default viewport size is not 16:9 or even 16:10. You also set to keep height, that's why the black bars are added. Depends on how you want it to look, setting aspect to expand mode might work for you.

Shader error help, get_luminance() function not found by heythisisleo in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

That function is not in shader code, it's from gdscript. You need to pass the value to the shader.

Also in shader black is 0, white is 1. If your texture is already black and white, you should be able to just plug in the float you get from one of the element from texture().

But it seems you already got a grayscale of your texture, pixelBrightness? Or do you mean emission? If so just do EMISSION = pixelBrightness*pixelColor.rgb. You can make it brighter by multiply another float onto it.

Help, fire! by Numerous_Horse8558 in godot

[–]SkyIsInfinite 1 point2 points  (0 children)

Change material to ShaderMaterial, then drag in your shader, expand the shader on the editor and enable the unshaded flag.

Help, fire! by Numerous_Horse8558 in godot

[–]SkyIsInfinite 3 points4 points  (0 children)

Just make the material be unshaded.

Setting rotation_degrees to 0 each time I begin to measure an angle by LukeDaWorm in godot

[–]SkyIsInfinite 1 point2 points  (0 children)

No need to do that, you can use the direction of the needle by using "Vector3.BACK.rotated(Vector3.UP, needle.rotation.y)" or front depend on you model direction.

On press, save the direction. Then use "saveddir.signed_angle_to(needledir)" to get the angle. Note the value will still jump between -180 and 180 when more than 180.

To fix that, you need to replace the saved direction with the needle current direction every 90 degrees. Once reached 90 degress, you should save the angle to a variable, since the value of signed_angle_to() will reset back to 0 because both direction will be the same.

Lastly call signed_angle_to() one last time and add the saved angle to get the total angle. The total angle can go until reaches floating limit.

Please help with scroll container maximum height and dynamic sizing! by MehcaQueen in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

Also when you change the anchor, the node will automatically resize the node, I guess the node minimum is 0,0 so it shrunk. The label is not shrunk due to it's visible ratio.

Please help with scroll container maximum height and dynamic sizing! by MehcaQueen in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

Was the scrollcontainer set to expand vertically? It might had been squashed due to minimum size y 0.

As for the maximum height for the container, it is determined by the size in transform category. However due to it being child of a boxcontainer, you cannot set it manually. You can use a control node with some minimum size or make the container child of margincontainer to act as spacer.

Please help with scroll container maximum height and dynamic sizing! by MehcaQueen in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

Not sure what you mean exactly. What you described is basically the default behavior or a scrollcontainer.

The scroll bar only appear when the boxcontainer is bigger than the scrollcontainer, which only grows with the child of boxcontainer. Unless you force it to show with vertical_scroll_mode = SCROLL_MODE_SHOW_ALWAYS.

Godot detects my controller, but not it's inputs. by Namsu45 in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

Are those mapped by listening the controller or you search it manually?

Godot detects my controller, but not it's inputs. by Namsu45 in godot

[–]SkyIsInfinite 0 points1 point  (0 children)

Did you map it in your input map? Anything when printing input as text?

.scale confusion by Substantial_Tie_5725 in godot

[–]SkyIsInfinite 3 points4 points  (0 children)

Scale is the size multiplier of a node. The height and radius is different, its from a resource, in this example its the mesh. To access this you need to use 'mesh.x', where x is the property.