Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"



I am trying to attach a scenecapture component to a camera, so I can capture and save images camera is seeing. I am trying to configure this component in C++ code (most examples on the web are from Blueprints). Can anybody point me to any working code or give me some guidance? Would much appreciate.


Product Version: UE 4.10
more ▼

asked Feb 13 '16 at 02:59 AM in C++ Programming

avatar image

1 1 2 2

avatar image vijaykam Feb 14 '16 at 04:01 PM

Below is my code, using a viewer pawn with an attached camera // Fill out your copyright notice in the Description page of Project Settings.

pragma once

include "GameFramework/Pawn.h"

include "ViewPawn.generated.h"

UCLASS() class CAPTURE3_API AViewPawn : public APawn { GENERATED_BODY()

public: // Sets default values for this pawn's properties AViewPawn();

     // Called when the game starts or when spawned
     virtual void BeginPlay() override;

     // Called every frame
     virtual void Tick( float DeltaSeconds ) override;

     // Called to bind functionality to input
     virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;

protected: UPROPERTY(EditAnywhere) USpringArmComponent* OurCameraSpringArm; UCameraComponent* OurCamera; // UTextRenderComponent* ShowText; USceneCaptureComponent2D* SceneCapture;

     // Input variables
     FVector2D  MovementInput;
     FVector2D  CameraInput;
     float      ZoomFactor;
     bool       bZoomingIn;
     bool       bEnableCapture;

     // Input functions
     void MoveForward(float AxisValue);
     void MoveRight(float AxisValue);
     void PitchCamera(float AxisValue);
     void YawCamera(float AxisValue);
     void ZoomIn();
     void ZoomOut();
     void DoCapture();


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question