21-12-2020, 08:52 AM
(This post was last modified: 21-12-2020, 08:53 AM by josemendez.)
(19-12-2020, 10:23 PM)Navvv Wrote: 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.
Obi is aimed at advanced users, so you might have a hard time using it if you're not familiar with how physics work. Just a forewarning. Don't be discouraged though!
(19-12-2020, 10:23 PM)Navvv Wrote: 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?
Yes, that's the standard approach to "grabbing" rigidbodies (regardless of them being constrained by rope/joints of not). You should enable it right when all "grab" conditions are met (the ball is close to the player's hand, and the player has pressed the "grab" button/key or something like that) and disable it once they aren't. The exact time duding the frame at which you enable/disable it isn't very important: if physics have already been updated during that frame, the change will be made effective during the next frame.