Possible to achieve with using forces/physics?

So, I’m looking to recreate bowling balls that curve as in real bowling. I want to move a ball down the lane using forces. But I want the ball to rotate as it’s moving down the lane-- but only going straight. Then, when the ball hits a collision detector it reacts (it curves the proper amount).

Is this possible? If so, can some one draw me up a quick example? Thanks! :smile:

:frowning:

It’s possible! But there’s not really a quick example. I haven’t done it myself, but I’ve heard good things about this beginner tutorial

Thanks for replying, but I don’t think that would help. I mean, the ball isn’t textured. So how can you tell if it’s rotating while moving?

Texturing is a whole other topic that could have a tutorial of it’s own. :wink: The Roll-A-Ball is a beginner’s tutorial. Tutorials that follow it deal with textured surfaces.
https://unity3d.com/learn/tutorials

Short answer: you can assign shaders and textures through Unity’s Material class.

You can add a texture to the Roll-A-Ball’s material if you want to see it roll around. This would be something good to experiment with after going through that tutorial.

Thank you, but I don’t think you understand what I’m trying to figure out. I want to rotate a gameobject while it moves with a force to an object, but the rotation force of the object doesn’t effect it’s force until it hits a certain block.

Can you spin the ball art without spinning the rigidbody? Or use a frictionless floor then swap it with a friction floor on contact with the block?

If I assigned the angularVelocity of the rigidbody on a frictionless floor, would it not ‘curve’ at all? If the friction level was 0. If so, that would work good.

I’m not 100% sure, I haven’t worked with physics materials much. Seems like it should just prevent the ball from passing through while not “grabbing” the rotation, but how physics in my head works and how Unity physics work are different things…

I’ll try that and tell if I need further help. Thanks :smile:

Oh! It is slightly working actually. I notice a difference when it rotates when it hits the friction lane part. It stops rotating! But it doesn’t effect it’s direction at all. :frowning:

You might need to swap out the frictionless material for one with friction. Other than that, all my ideas are how to fake it! (Eg: Spin only the art, don’t actually spin the rigidbody until you want the spin to affect physics.)

Woah! It actually DOES work! It rotates and when it hits the friction part of the lane it reacts like real bowling! That’s kinda freaky at the same time of being awesome… Can’t explain why it’s freaky, I guess the physics are rather life-like. :stuck_out_tongue:

Thanks for your help Garth! :smile:!

1 Like