naelstrof / UnityJigglePhysics

A unity addon for adding stretchy bouncy physics to bones and meshes.
MIT License
281 stars 33 forks source link

Collisions? #20

Closed SkyeDavisDev closed 1 year ago

SkyeDavisDev commented 1 year ago

I love the look and feel of the result and I think it looks better and is easier to work with vs Dynamic Bones. However, I need collision to work on my model, otherwise, I can't use this asset. Is there anyway to support this?

naelstrof commented 1 year ago

We've been considering adding it. I've been thinking it shouldn't be terribly difficult to program some collision code.

Though yeah it's not available right now at all. I do plan to tackle it soonish though!

SkyeDavisDev commented 1 year ago

Ah, damn. Don’t want to pressure you or anything, but is there a timeframe in that? I do like the results if your version! Might be able to get away with ignoring the collision issue for but if you plan on adding it in the next few weeks 😅

naelstrof commented 1 year ago

I can try to tackle it tomorrow, I've had a few friends who have requested it as well.

It probably won't be stable for a few weeks, but most likely would be usable in a few days. Assuming there's no critical issues.

naelstrof commented 1 year ago

Glad you like the solve though! It's exactly why we made it. All the other jiggle solutions we could find didn't do what we needed.

SkyeDavisDev commented 1 year ago

That’s be amazing! Not super time critical so no rush, but thank you! Might be using some if your other projects as part of what I’m working on too haha

SkyeDavisDev commented 1 year ago

Glad you like the solve though! It's exactly why we made it. All the other jiggle solutions we could find didn't do what we needed.

Yeah! Should be perfect for what I need. Beats trying to figure out unitys configurable joints!

naelstrof commented 1 year ago

Yeah! Feel free to ask questions about my other projects. While unity jiggle physics is properly documented, with a limited scope and reasonable features. Most of my other projects are wild solutions to specific problems with limited documentation and bloated features haha. I do use most of them in production though.

SkyeDavisDev commented 1 year ago

I’ll be sure to reach out if I run into any problems! Sticking with the BRP for now so can’t say much to the other half, but all I need are the bone movement

naelstrof commented 1 year ago

https://github.com/naelstrof/UnityJigglePhysics/assets/1131571/b9d4ccfb-6434-4d27-9fdc-4bbd65ac3fbb

There we go, still needs some testing. I put the "shape" of the jiggle bones within the sharable settings, which may or may not be a mistake. I'm also instantiating a hidden sphere object that represents the points which might not have correct flags set for in-editor use. And may not play well with domain reloading disabled. These things I'll iron out in the next few weeks.

For now though, it should be usable with the following git URL: https://github.com/naelstrof/UnityJigglePhysics.git#v6.1.0

naelstrof commented 1 year ago

Also oh no, since I referenced this issue in the commit, now when I push a subdirectory it's going to reference this issue every time I make an update 😨

You may want to mute it because I have no idea how to prevent that.

SkyeDavisDev commented 1 year ago

Damn, thank you! I'll give it a try!