← Home ← Back to /g/

Thread 105756828

18 posts 10 images /g/
Anonymous No.105756828 >>105756923 >>105758094 >>105758107 >>105758149 >>105758820 >>105759300 >>105759375
I do feel I've reached a point where my code has aesthetic literary value beyond being just code.

:D

It's beautiful.
Anonymous No.105756923
>>105756828 (OP)
Niggerlicious.
Anonymous No.105757189
ngmi use Script IDE
Anonymous No.105757972 >>105758091 >>105758149
what is this tranny text editor
Anonymous No.105758091
>Filter Meth

>>105757972
that's Godot
Anonymous No.105758094
>>105756828 (OP)
Meds, Cris.
Anonymous No.105758107
>>105756828 (OP)
>using $"" or %
NGMI energy
Anonymous No.105758149 >>105758267
>>105757972
That's Godot.
>>105756828 (OP)
Unrelated but you seem knowledgeable. How would you handle 3D character movement with a camera behind player? I'm currently rotating velocity to camera direction, and I'm wondering if that is correct or if I'm retarded.
Anonymous No.105758195
bro thinks using tab is some kind of creative expression, definitely a zoomer.
Anonymous No.105758267
>>105758149
for model rotation use this if you're doing a top down 2.5D movement:

player.rotation.y = lerp_angle(player.rotation.y, atan2(direction.x, direction.y)

This would give you a proper 8 directional rotation based on input.

For tank motion, dunno, never done it.

As for the camera, use look_at to make something rotate towards another object.
And use look_at_from_position.

You will save yourself a lot of trouble if you use look_at_from_position and look at, and lerp_angle and slerp.
Anonymous No.105758750
>func Transition():
Anonymous No.105758820
>>105756828 (OP)
>mixing levels of abstraction within a function
You don't know what beautiful code means.
Anonymous No.105759300 >>105759343 >>105759358
>>105756828 (OP)
Is this gdscript?
What fucking lunatic thought that the best way to identify a variable was to put fucking % in front of it?
Although looking at recent drama, I can expect the kind of retards behind this project.
Anonymous No.105759343 >>105759358
>>105759300
>identify a variable was to put fucking % in front of it?
it is not a variable
it is a lookup into the scene tree

idk if it is wise to put that in the physics loop
Anonymous No.105759358
>>105759300
% It's a shortcut to get_node("full_path") that doesn't break it you move the node in the scene hierarchy.

before that, It was commom to get the full path with get_tree().get_root().get_node("Battle/fullpath/node").

>>105759343
you can store a variable path using an autoload singletons that store the reference to the node.

I use that to get the clean reference to the player or the camera or the GUI or other nodes.
Anonymous No.105759375
>>105756828 (OP)
You're supposed to use exported node references and custom resources instead of $ and % lil bro
Anonymous No.105759467
random function
Anonymous No.105760880
that looks like absolute shit