loopier / animatron

Animatron for Godot 4.x <
15 stars 1 forks source link

OSC doesn't work #36

Closed loopier closed 2 months ago

loopier commented 2 months ago

OSC stopped working at some point.

I had to make a hack to get OSC to work.

loopier commented 2 months ago

Solved (I think) in https://github.com/loopier/animatron/commit/f9191cbfc6425fbff73fb57821d0a62604c3b83c

loopier commented 2 months ago

@totalgee suggested that this should work withouth OscReceiver being a Node.

So I'm undoing it and reopening the issue.

The object is added as a child in this line but it's not working. We need to find out why.

loopier commented 2 months ago

I posted the question on Godot's forum.

totalgee commented 2 months ago

You can't add it as a child if it's not some kind of Node, the deferred add_child probably fails. In the _physics_process() for Main you could just call the OscReceiver method to get messages.

totalgee commented 2 months ago

Or, make it extend Node. In fact, I see that is how the code is in develop, whereas in main branch it does not extend Node. That's likely why one is working and the other not.

loopier commented 2 months ago

Yes, I changed it in develop to see if it worked, but you suggested OscReceiver should not be a Node (or so I recall).

I tried also calling _physics_process from Main but that slowed down the app. Should we then just convert OscReceiver to Node? Why did it work before, then?

loopier commented 2 months ago

Or, make it extend Node. In fact, I see that is how the code is in develop, whereas in main branch it does not extend Node. That's likely why one is working and the other not.

OK, I'll leave it as a node, then, as fixed in f9191cb