gritsenko / c3_spine_plugin

Spine plugin for construct 3
MIT License
24 stars 8 forks source link

Need help adding new functionality 4.2 - Physics #97

Closed avatar45D closed 5 months ago

avatar45D commented 6 months ago

As a wish, it would be nice to add support for the new powerful functionality of version 4.2 Physics to webgl PhysicsConstraint PhysicsConstraintData Currently the plugin uses spine-runtimes-4.1 New functionality has been added to spine-runtimes-4.2 Best wishes and thank you!

MikalDev commented 5 months ago

Please review: https://github.com/gritsenko/c3_spine_plugin/releases/tag/2.9.0

Thanks to the donation, I sped up work on this.

Please test, I have not done much with physics myself, so I don't what additional ACEs (if any) are needed.

I did add the ACE Set physics mode w/ the default being 'update'

If you have a physics project to share, post a link here or send me a DM on Construct Community Discord server, so I can help further test.

MikalDev commented 5 months ago

One item we saw in our testing going from 4.1 -> 4.2, we had to add the following settings:

Screenshot 2024-05-14 at 5 08 58 PM
avatar45D commented 5 months ago

physics test.zip Everything is fine and thank you, but the physics animation is not played as it should in constructor 3 (Spine model in attachment) The name of the animation being tested is "swing"

MikalDev commented 5 months ago

Is this correct? I changed the project to use webGL2 (instead of Auto, which picks webGPU on my setup). This addon only supports webGL2, webGPU is not supported. There may be an official esoteric SW addon coming, which uses the C3 SDK directly and would with webGPU and webGL2. However that depends on when SDK V2 will be finished and if it supports more than the basic features.

swing

avatar45D commented 5 months ago

Yes, I know that webGPU is not supported, this is not webgl. The animation should be smoother celestial-circus-pro-wind-idle It’s physics that makes this animation the most realistic

MikalDev commented 5 months ago

I see, thanks for the visual, I will explore more.

MikalDev commented 5 months ago

Got a fix, will test a bit more and release tomorrow. The visual was a big help with debug, thanks for that.

avatar45D commented 5 months ago

Got a fix, will test a bit more and release tomorrow. The visual was a big help with debug, thanks for that.

Thank you for doing this!

MikalDev commented 5 months ago

Updated see release:

https://github.com/gritsenko/c3_spine_plugin/releases/tag/2.9.1