spine-runtimes icon indicating copy to clipboard operation
spine-runtimes copied to clipboard

[godot] no support for world position/rotation physics

Open yoont4 opened this issue 7 months ago • 4 comments

As the title describes, setting the position/rotation of a SpineSprite doesn't cause any of the physics constraints to do anything. You have to do some direct transform modification which is very clunky and error prone:

var cog = get_skeleton().find_bone("cog")
var current_transform = cog.get_global_transform()
var pos_delta = (target_bone_position + bone_offset) - current_transform.get_origin()
var new_transform = current_transform.translated(pos_delta)
cog.set_global_transform(new_transform)

Whereas I'd much rather have it respond to physics changes from typical sprite-level interactions:

# Ideally it would respond to sprite/node-level changes
global_position = target_position
rotation = target_rotation

Would it be possible to have a toggle if necessary to enable world-space physics calculation, rather than requiring direct modification to the internal skeleton positions?

yoont4 avatar Jul 08 '24 08:07 yoont4