Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D orbitControl allowing +-90 degrees not enough. #5958

Closed
1 of 17 tasks
ChristerNilsson opened this issue Jan 16, 2023 · 4 comments · Fixed by #6012
Closed
1 of 17 tasks

3D orbitControl allowing +-90 degrees not enough. #5958

ChristerNilsson opened this issue Jan 16, 2023 · 4 comments · Fixed by #6012

Comments

@ChristerNilsson
Copy link

Increasing Access

It would be nice to be able to observe an object from ALL angles.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

Feature enhancement details

I'm rotating a Rubik's cube and I can't turn to all angles. I would like to have the position in the image available for all top colors. I can only get the blue color on top, unfortunately. Maybe this is unsolvable, considering the mouse only has two dimensions. In that case, maybe the scroll wheel could be used for the third dimension.
Turning the cube upside down is impossible. (The blue face downwards)

Capture

function setup() {
    createCanvas(500, 500, WEBGL)
}
 
function draw() {
    background("#000")
    orbitControl(4, 4)
    rotateX(1)
    rotateY(1)
    rotateZ(1)  
    console.log(rotationX,rotationY,rotationZ)
    box(100, 100, 100)
}
@ChristerNilsson
Copy link
Author

It seems one dimension is restricted to +- 90 degrees.
The second dimension has no restrictions at all.

@ChristerNilsson ChristerNilsson changed the title 3D orbitControl allowing 360 degrees not enough. 3D orbitControl allowing +-90 degrees not enough. Jan 16, 2023
@davepagurek
Copy link
Contributor

Your use case makes sense, thanks for reporting this! In the mean time, maybe try using the p5.EasyCam library as an alternative form of orbit control: https://github.com/freshfork/p5.EasyCam

@AryanKoundal
Copy link
Contributor

@davepagurek Can I start working on this?

@davepagurek
Copy link
Contributor

Thanks @AryanKoundal! I'll assign this to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: DONE! 🎉
Development

Successfully merging a pull request may close this issue.

3 participants