Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parent Movement
#6
(29-02-2024, 09:00 AM)BusraSevim Wrote: The third image shows the image that occurs when I rotate the cylinder a little. Idont want this.

Is the solver transform centered at the cylinder (that is, is its local position 0,0,0?). Also, are both linear and angular inertia scale parameters in the solver set to zero, so that rotating/moving the cylinder doesn't inject world-space inertia?

(29-02-2024, 09:00 AM)BusraSevim Wrote: Attachment also works, but it doesn't give me what I want. I asked about velocity resetting, thinking that if I reset all the forces on the sphere before applying force, I could avoid this. But it wasn't very healthy either. Is what I want possible with obi softbody?

Parenting the solver to the cylinder and using attachments are both designed to allow for perfect rotation, but I think you just want to add an acceleration towards the cylinder for each softbody, and apply a material with friction to the cylinder collider and/or the softbodies. This way when the cylinder rotates, the softbodies in contact with it will rotate too due to friction - with no friction, they will just freely slide on top of it.

See the "ObstacleCourse" sample scene, the rotating platforms at the end of the course make the softbody ball rotate when on top of them, this doesn't involve either parenting or attachments but only friction.

Same approach would work for rigidbodies, by the way.

(29-02-2024, 09:00 AM)BusraSevim Wrote: The simplest way is to create a separate solver for all of them and make the movement completely by gravity, as it rotates, it is automatically pulled in. But this is not healthy either, and as far as I have read, particles that are not under the same solverdo not detect each other, and I need to detect each other.

You don't need separate solvers to have individual, per-softbody (or even per-particle) gravity. Gravity is just an acceleration, you can either use softbody.AddForce with acceleration mode or modify the velocity of each particle using the particles API.

The gravity value in the solver is only there for convenience, it applies the same acceleration to all particles managed by the solver - which is the most typical use case.

Again, the same thing would work for rigidbodies: no need to have separate physics scenes in Unity to have per-object gravity.

kind regards,
Reply


Messages In This Thread
Parent Movement - by BusraSevim - 28-02-2024, 10:07 AM
RE: Parent Movement - by josemendez - 28-02-2024, 10:45 AM
RE: Parent Movement - by BusraSevim - 28-02-2024, 12:22 PM
RE: Parent Movement - by josemendez - 28-02-2024, 12:26 PM
RE: Parent Movement - by BusraSevim - 29-02-2024, 09:00 AM
RE: Parent Movement - by josemendez - 29-02-2024, 09:50 AM