playMaker

Author Topic: Zoomable turntable  (Read 2721 times)

parallel

  • Full Member
  • ***
  • Posts: 155
Zoomable turntable
« on: August 28, 2013, 05:17:30 AM »
I'm restarting work on a project, which I gave up 2 months ago as I couldn't make unity/ playmaker do as I wanted. The idea is to have a human model (actually 5 nested models: skin, muscles, organs, nerves and skeleton) which you can rotate around and zoom in on, while peeling back the opacity of the nested layers of the model.

Eventually I'd like something like this (though with a different menu and 'peeling' system):
http://www.zygotebody.com/

But this time I'm going to take it one step at a time and see if you guys can help me with my playmaker learning disability, from scratch. I'll start out just nesting 5 cubes of different colors and see if I can get a simple zoomable turntable.

How do I make a turntable? to rotate a model rather than rotate the cam around it I guess is the way to do it (mouse left-right rotates, mouse up-down moves model up down)

How best to make a zoom function? (MiddleMouseButton scroll in and out)

How to cleverly make a manager for controlling the levels of opacity. Say with shift+MiddleMouseButton; each scroll count turns down the opacity 50%, from the outer model (skin) towards the inner (skeleton). That would make every model have 3 opacity settings (100%, 50%, 0%), but how to make best go about controlling this peeling function?

I would much appreciate any pointers, tutorials or examples. 

blackant

  • Hero Member
  • *****
  • Posts: 525
  • http://blackantmaster.com
    • blackantmaster.com
Re: Zoomable turntable
« Reply #1 on: August 29, 2013, 04:32:29 PM »
Hello parallel,

i can't answer everything but could help a little on zooming because i'm actually working on it.

first of all, you should add a raycast to your camera and store the hit distance into a global var.
after that see those attachments.

one FSM for scrollwhell, the other for limits gestion.

i know this is not perfect, but it's good start, i'm actually working on a smoother zoom.

parallel

  • Full Member
  • ***
  • Posts: 155
Re: Zoomable turntable
« Reply #2 on: September 02, 2013, 01:22:36 PM »
Thanks for your reply and examples Blackant, though I can't see what the raycast distance var is for?

I got the camera orbit working thanks to the 'Camera Orbit Tool' from the asset store, (though it needs some extra work on orbiting selected areas and is now only geared towards orbiting the main model). Also got a basic zoom (get axis+translate).

Now I'm working on getting a menu system with sliders working that should be dock-able or show up at the mouse point when activated, preferably without the use of any external GUI packs as I can't afford them. Any good examples here besides the three button one in the testlab folder?