x

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"

UPROPERTY(EditAnywhere) variable when changed in the editor dont reflect in the game

So I have created Zoom ability to my pawn and I would like to be able to change the Maximum and Minumum zoom in the editor So I created this in the .h file: Code:

 UPROPERTY(EditAnywhere, Category = Ball)
 float MinZoom;

 UPROPERTY(EditAnywhere, Category = Ball)
 float MaxZoom;

declared them in the constructor and made created a method for zooming ability in .cpp: Code:

 void AMyPawn::Zoom(float Axis)
 {
     float ArmLengthfactor = -Axis * 20.f;
     CameraSpring->TargetArmLength = FMath::Clamp(CameraSpring->TargetArmLength + ArmLengthfactor, MinZoom, MaxZoom);
 }

which worked! but I decided to tweak the values in the editor to get a more feasible value, but for some reason when I changed the value in editor nothing changed in zooming. So I went in the code changed it manually and then it worked.

Why is it that when I change the value in the editor doesnt work but when I change the value in code it works?

Remember that Im spawning the Blueprint drived from the c++ class. I have tried it both ways.

Product Version: UE 4.15
Tags:
more ▼

asked Jul 14 '17 at 04:54 PM in C++ Programming

avatar image

dogu189
18 5 9 12

(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