Closed arisvaldez closed 3 years ago
@arisvaldez This actually works? You get global position of the bone in Godot viewport?
@davord45 ,That's right, I made the change that I proposed and it works wonders for me
Can you make a pull request? @arisvaldez Or maybe a build that you can share?
I can share a compilation and also the modified code
I would appreciate that very much,thanks!
u can download a build from here
godot 3.2.3
Thanks again!
you can download the code from this repo
I just added some methods in the GDBone.cpp and GDBone.h
I did not delete or replace the ones you had already put, but add more
@davord45 look in the file DragonBones/src/dragonBones/armature/Bone.cpp
in this file I made a modification in the method _updateGlobalTransformMatrix
I would like to make a pull request, but I have never done one, so I would not want to spoil something, jeje.
@arisvaldez What changes did you make in DragonBones/src/dragonBones/armature/Bone.cpp? I don't see any changes. :/
Weird that im not getting emails about this.
Anything left to do after the recent merge @davord45 ? Looks to me like this issue can be closed but just want to make sure.
Well setting the global position does not seem to be working when i try it. But i guess that is a different issue.
Ok, I'll leave this open and look into it when I start putting together the 3.2.4 release (probably this weekend).
Thanks :)
On Thu, 18 Mar 2021 at 12:38, davord45 @.***> wrote:
Well setting the global position does not seem to be working when i try it. But i guess that is a different issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mauville-technologies/godot_dragonbones/issues/28#issuecomment-802095227, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM5S4UCXAHWWK4TSVTQYHTTEIT7HANCNFSM4USEM3EA .
@arisvaldez What changes did you make in DragonBones/src/dragonBones/armature/Bone.cpp? I don't see any changes. :/
I think that the change I made did not apply, and it was not relevant
I've linked the PR that makes a few changes across the bone to the way bone position is handled to enable a set_bone_global_position
function.
change the method to obtain the bone position, you are currently using boneData->animationPosition, but this returns a Vector2 (0,0), and always return the same value.
However if you get the value from boneData-> Global, you will be able to obtain the real time value of the bone movement.
Vector2(boneData->Global.x, boneData->Global.y)
I already made that modification and it worked for me.