Thread: Model tilting
View Single Post
10-22-13, 12:33 PM   #4
Malsomnus
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2013
Posts: 203
Say the slider moves between -180 and 180, and we call its value [i]s/I], and you have some value for camera distance because, you know, different model sizes, then you want something like:

Lua Code:
  1. local deg = s * math.pi / 180
  2. local y = math.pow (math.sin(deg), 2) * camDistance
  3. local z = math.pow (math.cos(deg), 2) * camDistance
(I think. It's been a long day.)
__________________
SanityCheck - If you've ever said the words "Sorry, I forgot" then you need this add-on.

Remember, every time you post a comment on an add-on, a kitten gets its wings!
  Reply With Quote