% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rayshader.R
\name{look_at_origin}
\alias{look_at_origin}
\title{Compute rgl rotation matrix to look at the origin from a given position}
\usage{
look_at_origin(eye)
}
\arguments{
\item{eye}{Numeric vector of length 3 (x, y, z) — camera position.}
}
\value{
A 4x4 rotation matrix.
}
\description{
Builds a 4x4 rotation matrix suitable for `rgl::view3d(userMatrix = ...)`
that orients the scene as if the camera is at `eye` looking toward the
origin with z pointing up.
}
\keyword{internal}
