#!/usr/local/bin/php Obsessive Camera Direction

OCD Reference

Reference for OCD version 1.4 for use with Processing (BETA) version 125+. If you see any errors or have any comments, let me know.

Name

aim()

Examples

To view this content, you need to install Java from java.com

import damkjer.ocd.*;

Camera camera1;

void setup() {
  size(100, 100, P3D);

  camera1 = new Camera(this, 200, -250, 300);
}

void draw() {
  background(204);
  lights();
  camera1.feed();

  rotateY(PI / 3);
  box(50);
}

void mousePressed() {
  camera1.aim(width, -height, 0);
}

void mouseReleased() {
  camera1.aim(0, 0, 0);
}

Description

Instantly change the camera's center of interest to the specified target.

Syntax

aim(targetX, targetY, targetZ)

Parameters

targetX

int or float: x coordinate for the center of interest

targetY

int or float: y coordinate for the center of interest

targetZ

int or float: z coordinate for the center of interest

Usage

Web & Application

Related

jump()

./processing/libraries/ocd/reference/Jump/">jump()