ScratchData LogoScratchData
Back to AtomicBawm3's profile

Different 3D technique

ATAtomicBawm3•Created July 10, 2012
Different 3D technique
71
49
1872 views
View on Scratch

Description

Now should work on mobile devices. CONTROLS: Camera rotation- x-axis: a and d y-axis: w and s Cube rotation- x-axis: right and left y-axis: up and down This is a different technique for 3D then the usual one you'd see on Scratch. Instead of using projection techniques and such, this actually uses a kind of reverse-raytracing method. Basically, the idea is that every pixel on the screen can be represented by a horizontal rotation and a vertical rotation. So in otherwords, instead of trying to use just the cube's position to determine it's drawn image, this uses an observer's or camera's location as well. Based off those two positions and the offsets of the corners, you can figure out the direction towards the corners vertically and horizontally and store that value...and then draw the whole cube at once. There are still problems with it of course...I'm still working on being able to move in the environment, right now the camera is stationary.

Project Details

Project ID2665067
CreatedJuly 10, 2012
Last ModifiedJuly 10, 2012
SharedJuly 10, 2012
Visibilityvisible
CommentsAllowed