p5.EasyCam
p5.EasyCam copied to clipboard
Rotations around world axes
Hey there,
Thanks a lot for this plugin, it's really helping out!
I'm using p5 for a visualization for a project, but I'm having trouble making an orbiting camera that stays upright. By that I mean having no roll and and making yaw rotation around the world coordinates instead of the camera coordinates, like you would see in any video game where you see the world from above or even when you look around in Blender. I have tried many approaches but haven't managed so far, do you have any idea?
Thanks a bunch!
hi there. i guess it's too late, but i'm curious if you managed to solve it! i faced same problem here, so i thought it would be ok if i set the distance to be (1,0). i mean just close to the camera. now if i drag mouse, the camera will rotate around itself (by one pixel difference) and it looks good in this way... what about you?
Oh my god that was almost a year ago. I completed this project without p5 in the end. I used Three.js and here is what I settled with:
camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 10000 );
controls = new THREE.OrbitControls( camera, renderer.domElement );
Yup... sooo late... time really flies... :-) thank you anyway...
My pleasure!