Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the method to obtain the bone position #28

Closed
arisvaldez opened this issue Dec 8, 2020 · 15 comments · Fixed by #30
Closed

change the method to obtain the bone position #28

arisvaldez opened this issue Dec 8, 2020 · 15 comments · Fixed by #30

Comments

@arisvaldez
Copy link

arisvaldez commented Dec 8, 2020

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.

@davord45
Copy link

@arisvaldez This actually works? You get global position of the bone in Godot viewport?

@arisvaldez
Copy link
Author

@davord45 ,That's right, I made the change that I proposed and it works wonders for me

@davord45
Copy link

davord45 commented Mar 10, 2021

Can you make a pull request? @arisvaldez
Or maybe a build that you can share?

@arisvaldez
Copy link
Author

I can share a compilation and also the modified code

@davord45
Copy link

davord45 commented Mar 10, 2021

I would appreciate that very much,thanks!

@arisvaldez
Copy link
Author

arisvaldez commented Mar 10, 2021

u can download a build from here

godot 3.2.3

@davord45
Copy link

Thanks again!

@arisvaldez
Copy link
Author

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

@arisvaldez
Copy link
Author

@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.

@davord45
Copy link

@arisvaldez What changes did you make in DragonBones/src/dragonBones/armature/Bone.cpp?
I don't see any changes. :/

@Ozzadar
Copy link

Ozzadar commented Mar 18, 2021

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.

@davord45
Copy link

Well setting the global position does not seem to be working when i try it. But i guess that is a different issue.

@Ozzadar
Copy link

Ozzadar commented Mar 18, 2021 via email

@arisvaldez
Copy link
Author

@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

@Ozzadar Ozzadar linked a pull request Mar 20, 2021 that will close this issue
@Ozzadar
Copy link

Ozzadar commented Mar 20, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants