jwlgowi

joined 2 years ago
MODERATOR OF
[–] jwlgowi 2 points 2 years ago

Personally, I’d drop all the macro template syntax, applys, intersects, etc. And simplify the function arg to be just: (sequences)

let item-map make-hash-table
  dolist seq sequences
    dolist item seq
      ;; gethash / return / or setf & continue
[–] jwlgowi 2 points 2 years ago* (last edited 2 years ago) (2 children)

If you don’t care about the intersection values:

init empty hashmap w best guess on size
Iterate sequences
  Iterate elements
    If elt in hashmap return t
  Add elt to hashmap
return nil

If you have maybe million+ elements, a db like sqlite might help. Unique index, insert each item til you get a unique constraint failure.

[–] jwlgowi 2 points 2 years ago

I think your supposition about using ik just to capture (key) animations is right. I wouldn’t delete the bones after because you might add or tweak the animations later.

Then you should be able to -X the scale for whatever the root node 2d of your character is.

Maybe helpful: https://ask.godotengine.org/110222/possible-animation-player-deals-animating-position-rotation

[–] jwlgowi 1 points 2 years ago* (last edited 2 years ago)

Here's a nice tutorial vid - simpler arcade-like control than my example. Looks like this is for Godot 3.x but the concepts should translate to v4 pretty closely.

https://www.youtube.com/watch?v=RsrwmAme_WA

[–] jwlgowi 2 points 2 years ago

5 is a lot. I’ll do 4:

  • tuesday: Carter hall
  • holiday: Escudo (will settle for peterson de luxe navy rolls)
  • rainy autumn day, once a year: Squadron Leader
  • muggles nearby: macbaren Scottish blend
[–] jwlgowi 2 points 2 years ago (1 children)

I think I have it working as you describe - in the latest version on GitHub. That is more complete now than the code snippet above. See if that helps.

[–] jwlgowi 2 points 2 years ago

Now for no good reason I added flaps that rotate with the controls. Definitely feature creepin. I’m out! Good luck op!

[–] jwlgowi 2 points 2 years ago (1 children)

Not shown in the code here for simplicity, but in the project I added a little bit of yaw drift when banking.

I’m sure there’s a more accurate way to simulate all this. Just messin around.

[–] jwlgowi 1 points 2 years ago* (last edited 2 years ago) (1 children)

True. Just showing roll and pitch. This is not op’s code… oh perhaps that’s the thing op really needs to see though? I’ll update the example to show it…

[–] jwlgowi 4 points 2 years ago* (last edited 2 years ago) (8 children)

(Not op, just an example)

I don’t know an optimal answer here. I see various discussions online about flight control variants. However, here is a simple example I set up out of curiosity. Maybe useful? I’d like to hear about what you end up with.

Project code at: https://github.com/pipehat/godot41_flight_controller_example

————————————

plane controller script:


extends CharacterBody3D

var print_delay = 1
var next_print = 0
const SPEED_MPS = 500

func _physics_process(delta):
	var input_dir = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
	
	if next_print <= 0:
		print(input_dir)
		print("-z: ", -transform.basis.z)
		next_print = print_delay
	else:
		next_print -= delta
	
	var roll = -input_dir[0]
	var pitch = input_dir[1]
	
	rotate(transform.basis.z, roll * delta)
	rotate(transform.basis.x, pitch  * delta)

	velocity = -transform.basis.z * SPEED_MPS * delta
	move_and_slide()

[–] jwlgowi 2 points 2 years ago* (last edited 2 years ago) (2 children)

Not tested but perhaps you should be using rotate_object_local - so the rotation is in the plane’s own axis, rather than that of its parent.

[–] jwlgowi 2 points 2 years ago (1 children)

Do you find that box pressed cigars burn similarly to round ones? Haven’t tried one yet. Seems like the corners could be fussy. On the other hand, fire.

6
submitted 2 years ago* (last edited 2 years ago) by jwlgowi to c/tobacco
 

DO:

  • Get an inexpensive corn cob pipe ~10 USD. The trusted famous brand is Missouri Meerschaum.
  • get a well loved “codger blend” like Carter Hall or Prince Albert
  • watch some YouTube videos on packing and lighting; keep it simple (3 step packing)

DON’T

  • buy an expensive pipe to start with
  • get frustrated with learning curve - patience

Tobacco Types

  • wealth of info at tobaccoreviews.com
  • aromatics (broadly, smell good but no taste)
  • virginia / burley: core tobacco leaf types (notes of bread, hay, leather)
  • latakia: smoke cured (campfire smokey smells)

Try them all. See what you like. (But va/burley is the best!)

Image source: https://www.flickr.com/photos/miguellopezmallach/15365251481/in/photostream

view more: ‹ prev next ›