Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Grab ball that is attached to rope
#3
(19-12-2020, 09:15 AM)josemendez Wrote: If the ball is a rigidbody, moving it around using its transform does not make much sense as that ignores physics. It just sets its position, ignoring any forces and/or constraints applied to it.

You will be able to overstretch the rope ignoring any forces applied by the it, and the ball will move out of sync with the physics update (not in FixedUpdate, but in Update) causing all sorts of weird issues. This would happen with regular joints too.

Non-kinematic rigidbodies should be moved using forces/impulses/velocity changes, specially if they’re constrained (be it using joints and/or Obi attachments). See the “wraprope” sample scene: https://youtu.be/7ugSN7laNd4

Ah, thanks so much. That clears up a lot of confusion since I haven't worked with Unity Physics much before in my previous games. So basically, when I want the player to grab the ball, I will turn iskinematic on and parent it to the player's hand. Then, when the player is about to hit/serve the ball, I will turn iskinematic off. Does this sound correct? If you can give me any tips as well on exactly what point should I disable iskinematic and unparent the ball from the player's hands I would really appreciate that. Should I disable it exactly when the player hits the ball, or before? If before, how long before?
Reply


Messages In This Thread
Grab ball that is attached to rope - by Navvv - 19-12-2020, 03:53 AM
RE: Grab ball that is attached to rope - by Navvv - 19-12-2020, 10:23 PM
RE: Grab ball that is attached to rope - by Navvv - 21-12-2020, 09:12 PM