Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Obi Solvers for Gravity
#1
Hello, 
I am looking to buy obi rope, but I am not sure if it's functionality is right for my project.

In my game, objects will not all experience gravity in the direction, but rather there are different zones where gravity will be acting in different directions. Is having multiple different obi solvers for each of these zones (so that I can set different directions of gravity in each solver) a good idea? Is it possible for ropes to move between these different solvers? Or should ropes each have their own solver, and the solvers are updated individually?

Thanks!
- fruit
Reply
#2
(05-09-2020, 08:29 PM)capt_fruit Wrote: Hello, 
I am looking to buy obi rope, but I am not sure if it's functionality is right for my project.

In my game, objects will not all experience gravity in the direction, but rather there are different zones where gravity will be acting in different directions. Is having multiple different obi solvers for each of these zones (so that I can set different directions of gravity in each solver) a good idea? Is it possible for ropes to move between these different solvers? Or should ropes each have their own solver, and the solvers are updated individually?

Thanks!
- fruit

Hi there,

Yes, you can use multiple solvers to organize your objects. Just keep in mind that objects in different solvers can't iteract with each other. You can also reassign ropes between solvers at runtime, but this is a somewhat expensive operation so you should not abuse it.

Another possibility is to just apply your own gravity to each individual particle, regardless of your solver setup.

kind regards,
Reply
#3
(06-09-2020, 04:02 PM)josemendez Wrote: Hi there,

Yes, you can use multiple solvers to organize your objects. Just keep in mind that objects in different solvers can't iteract with each other. You can also reassign ropes between solvers at runtime, but this is a somewhat expensive operation so you should not abuse it.

Another possibility is to just apply your own gravity to each individual particle, regardless of your solver setup.

kind regards,

Thanks for responding!

Is applying gravity to each individual particle trivial or would it also be intensive? I want to make sure that my game stays fairly economical on processing power.

- fruit
Reply
#4
(07-09-2020, 05:50 AM)capt_fruit Wrote: Thanks for responding!

Is applying gravity to each individual particle trivial or would it also be intensive? I want to make sure that my game stays fairly economical on processing power.

- fruit

Depends on how you implement it. It all boils down to writing data to a Vector3 array.

If you do a basic for loop in a single thread, it can get intensive for many particles. Using Jobs + Burst it would be much faster.
Reply