Baseball game - "real" pitches...

We’re working on a vive baseball game and I’m trying to create realistic pitches. Specifically a slider, a fastball, and a curve ball. I’ve had some luck creating a path and having the balls follow it - but I have a problem that at the end, when the player either catches or misses the ball, I need the ball to release from the path and folow normal physics.
Thoughts?

Like shaderbytes said, when you are applying your own curves, if they are not by physics, disable the rigidbody effects by setting it to kinematic. When you want physics to take over again, stop your own curves from effecting it and disable kinematic. If you are manipulating the pitch via physics forces to begin with then only you would need to do would be to disable those forces.

I will have to test I guess. I knew I could turn off kinematic to allow the ball to react to physics - but the ball isn’t going to use the motion/force from the path animation it was on right? I’m concerned I’ll need to add a force when I switch and I’m worried it will be noticeable is all.

you can set the velocity after turning off kinematic by recording it manually using distance moved since last frame/time.delta time, then assign it to the rigidbody. This should keep it roughly along the same path.

1 Like