V-Sekai / godot-vrm

Importer/Exporter for VRM avatars and MToon shader. Available for Godot 4.1+ and 3.2+ in the Asset Library.
https://godotengine.org/asset-library/asset/2031
Other
287 stars 24 forks source link

springbone_add_force not updated at runtime #84

Closed Illauriel closed 3 weeks ago

Illauriel commented 12 months ago

I've experimented with creating a dynamic wind effect and noticed that springbone_add_force updates correctly in editor (if Update in Editor is ticked ofc), but doesn't affect the bone simulation at runtime.

I blame this part.

#vrm_secondary.gd line 203

if not Engine.is_editor_hint() or check_for_editor_update():

Basically, control only reaches the part where springbone_gravity_multiplier, springbone_gravity_rotation and springbone_add_force only in editor. I've solved it with a dirty hack for now, but would be nice to have it as an integral part of the addon^^

lyuma commented 9 months ago

Thanks for the report. I will try and work on this issue this week. Ideally it would be possible to modify more properties on spring bones, and at least be able to modify properties at runtime.

I also hope to make vrm_secondary less dependent on vrm_toplevel. My plan is to add signals so we can fire a signal to all VRMSpringBoneLogic instances when properties change (possibly deferred so the signal can be batched)