controls - How do I put limits on OrbitControl - Three.js -


is there way put limits on orbitcontrols.js? imagine i'm creating above ground, wouldn't camera go below ground, know mean?! same things goes zoom in , zoom out. there way set variables limit that? cause don´t want camera getting close or far away.

thanks lot. =)

orbitcontrols source

zoom in / zoom out

this.mindistance = 0; this.maxdistance = infinity; 

where stop rotation :

this.minpolarangle = 0; // radians this.maxpolarangle = math.pi; // radians 

don't let go below ground

controls.maxpolarangle = math.pi/2;  

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -