Net Simulation Ideas

Hey all, what would be the best way to go about simulating a net that can hang behind a field goal? I’m making a game where you kick a football through a field goal and am trying to integrate the net that can catch balls that go through the post. Does anyone have any ideas for this? Libraries they recommend? And if you have a solution that requires integrating an external library, what is the best way to import external libraries into PlayCanvas? Sorry I’m still pretty new to PlayCanvas. Thanks in advance!

Hey, i haven’t simulated a net yet but i think soft dynamic body will be helpful for simulating a net. Few Days ago Will made a demo about cloth simulation. Check that here https://playcanv.as/p/xoodQ740/.
You can see the details of Soft Dynamic Body here.

@saif is that able to be done by a regular PlayCanvas user? I was under the impression that you could only do that in the dev builds that aren’t out yet.

I guess they are open for a regular Playcanvas User. Although, you have to overwrite some of the shadors and have to implement few things but are open for anyone. You can check more details on the link i provided.

I can think of 3 ways to do this

1 Like

and you could also set up bunch of morph targets in your net, and morph the mesh, similar to this.
http://playcanvas.github.io/#graphics/mesh-morph.html
That would probably have the best performance as would be done entirely on GPU …
You could set up mesh deformation for maybe 10 or 20 points, then pick the nearest one and morph that one with weight.
http://playcanvas.github.io/#graphics/mesh-morph.html

2 Likes

Using animation is probably a great option too as @yaustar mentioned. Place and array of bones in the net, and programatically move them as needed.

2 Likes