Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

3d object viewer

Discussion in 'Scripting' started by 3dtutorial, Apr 2, 2007.

  1. 3dtutorial

    3dtutorial

    Joined:
    Mar 9, 2007
    Posts:
    17
    I was wondering if anyone has ever scripted a 3d object viewer using Unity?

    Here is what I'm after...

    I would like to be able to display a lit 3d object on screen and then be able to have the user rotate, zoom and pan the loaded object using the mouse.

    Has anyone done this? I don't want to waste time reinventing the wheel if someone has a solution.

    If so, any help would be appreciated. I just getting started with Unity and I have no idea how to do this.

    TIA

    Joe
     
  2. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    not exactly a viewer but you can just plop the model in unity and put the mouseorbit script on your camera. doesn't zoom (i don't think) but that shouldn't be hard to add to the script - just slerp the camera position closer on some key event.
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I haven't done it, but the interaction part would be simple to script. If you wanted the user to load arbitrary objects from disk, though, that would be tricky, if that's what you're asking. On the other hand, selecting from any number of built-in objects that you've included would be easy.

    --Eric
     
  4. 3dtutorial

    3dtutorial

    Joined:
    Mar 9, 2007
    Posts:
    17
    Hi, no it's not necessary for the user to browse for the object, it would be loaded as a built-in object only.
     
  5. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    Thats very very very simple to do with Unity. Almost no scripting knowledge needed. Just arrange your scene with the object and mouse orbit, connect the scenes and you are done.
     
  6. 3dtutorial

    3dtutorial

    Joined:
    Mar 9, 2007
    Posts:
    17
    Ok, great.

    Thanks for the tips, much appreciated.

    Kind Regards,

    Joe :D