unity 3d model viewer

HEY i've just done a script in C that looks like a 3D model viewer. But i have a problem

(i can zoom in or out a model with the touch of two fingers, i can rotate the model by moving the finger)

The problem is i would like some inertia, that's to say when i'm done moving my finger the object still rotates a little, as if it had some inertia .

If you have any ideas ? thx

Use comments to comment and answers to answer.

3 Answers

3

Have a look at some standard assets. You are searching for smoothing. So for example, the script in `Standards Assets/Scripts/Camera Scripts/SmoothLookAt.js` does these things with a lookAt. So maybe you can take a look into that script.

I also found this post on the unity forum: http://forum.unity3d.com/threads/11383-How-do-I-smooth-out-the-movements-of-a-MouseLook-Camera

I can't remember exactly, but I was able to get something along those lines in one of my experiments, using the drag rigidbody preset script, with another script that reset its position in LateUpdate so dragging only rotated the object.

This made it so dragging quickly would spin the object and give it momentum to keep spinning. This could be adjusted in the Drag rigidbody script using the spring and damper settings.

Hi Jacob28 - would you be willing to share the source for this project? I’m trying to create the same thing. Thanks!