Hi there, gradually getting my project ported over from papervision, one minor problem I’ve yet to solve is that at the moment the view is distorted kind of like the opposite way to what a fisheye lense does, which in papervision I found was determined by the .zoom and .focus attributes. Just wondering how to alter the same sort of settings in away3d 4 ?
SOLVED: Equivalent to camera.zoom and camera.focus in away3d 4?Software: Away3D 4.x |
||
|
||
Mr Margaret Scratcher, Sr. Member
Posted: 14 September 2011 03:30 AM Total Posts: 344 [ # 1 ] Okay, got it, need to define a lense for the camera:
camera.lens = new PerspectiveLens (30);
Where the part in brackets is the fieldOfView - larger = wideangle |
||
Hector, Sr. Member
Posted: 12 December 2011 10:48 AM Total Posts: 137 [ # 2 ] Hi Mr Margaret, thanks for posting the answer. |
||
GameDesigner, Jr. Member
Posted: 25 February 2012 06:27 PM Total Posts: 33 [ # 3 ]
Nice tip, but what about if you want tween the fov using tweenlite? I’ve tried to modify the original class of PerspectiveLens and LensBase to do that but it isn’t working. TweenLite.to(camera.lens, 2, { lensFov(30) }); Any idea? |
||
|
||
|
||
John Brookes, Moderator
Posted: 25 February 2012 10:45 PM Total Posts: 732 [ # 6 ] You dont need to create one, it gets created when you create the view. Just cast it //eg works in renderloop |
||
|
||
GameDesigner, Jr. Member
Posted: 01 March 2012 12:03 AM Total Posts: 33 [ # 8 ] You are awesome! Thanks! |