New answers tagged

1

It sounds like you want something like this... struct LineSegment { public Vector3 start; public Vector3 end; public LineSegment(Vector3 start, Vector3 end) { this.start = start; this.end = end; } } public LineSegment LiftByAngle(LineSegment original, float angleDegrees) { // Compute an arrow pointing along the line segment, ...


1

Overview Set up an endless 1D track of 2x 2D planes. As you run forward, the plane behind you comes forward to keep you running; this keeps happening repeatedly whether you run forward or backward. Now do the same thing in 2D i.e with 2x2 2D planes. Wherever you go, the world continues beneath your feet. Transform the planes to a perspective view. Now ...


2

Move the camera higher up. The human brain expects to be see from the normal human eye height above the ground, so about 150-170 cm. So your walls look about 4-6 metres high. Make the camera 10 times as high, and now they're 0.4-0.6 metres high. Your current perspective is appropriate for a dungeon crawler where each wall is a voxel and the walls have traps ...


0

There's no such thing as "camera size". If you have a free-moving camera, the perceived "camera size" depends solely on the camera movement speed. If you make your world N times larger and increase the movement speed N times, those two actions will cancel each other out, and the end result will be the same. So instead of making the world ...


0

Note that camfwd is solely defined by (yaw,pitch) so calculate that first. Given fwd / left / up of the null-rotation (right-handed system)... // yaw the forward vector. vec3 projectedcamfwd = fwd * cosf(yaw) + left * sinf(yaw); // pitch the forward vector. vec3 camfwd = projectedcamfwd * cosf(pitch) + up * sinf(pitch); If you never want camera roll, then ...


Top 50 recent answers are included