Skip to content

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

@ChristerNilsson

Description

@ChristerNilsson

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)
}

Metadata

Metadata

Assignees

Type

No type

Projects

Status

DONE! 🎉

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions