Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parent Movement
#1
Hello,

In my scene, there is a normal rotating cylinder and softbody spheres arranged around this cylinder. In order to attract the center of the cylinder, I apply a force to all spheres as follows:


Code:
var forceDirection = (spin.transform.position - transform.position).normalized;
softBall.AddForce(forceDirection * force, ForceMode.Acceleration);


But at the same time, the cylinder is the parent object of these spheres. And when I rotate the cylinder, I want these spheres to rotate with the cylinder, like normal spheres. But they don't rotate, I can only see the strain vibration. They can rotate when I turn off the softbody features, but I shouldn't turn them off.

The rotation code of the cylinder is as follows:


Code:
transform.Rotate(Vector3.forward,-_inputVector.x*spinRotateSpeed);


I use the solver and sphere softbody features in the sample scene named BallPool.

Thanks.
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