openframeworks / openframeworks/openFrameworks

ofEasyCam distance not set until second frame

Open
#5,018 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

At the moment, ofEasyCam::update() is not called until the second frame as events are not attached to the camera it until the first call of ofEasyCam::begin(). This is problematic as the camera distance is set in ofEasyCam::update(). This was causing problems for me as I expected the distance to be set up in the constructor so that I could use the camera in ofApp::setup() without needing to call ofEasyCam::setDistance() myself.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing ofEasyCam's constructor, update(), and begin() flow, especially how event attachment delays update(). Check how ofApp::setup() uses the camera before begin() is called. Done means the camera distance is initialized before setup-time use, without requiring an explicit setDistance() call.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.