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"

UE 4.8.2 crashing on a blueprint compile with a C++ function

I have this really weird issue with C++ and Blueprints. So what happens is i have a PlayerController and in the PlayerController i have a C++ function that is suppose to rotate the camera that is attached to the character which the controller is controlling. How it work is when the rotate camera function is called it goes into the Character and call its own rotate camera function, but it doesn't. When i make a blueprint class of my PlayerController and i call rotate camera from it, it freezes when i compile the blueprint, and i have to manually shutdown UE4. SO here are some things i discovered:

  • If i call the rotate camera function in the Character class from the PlayerController Blueprint class, i just cast the get pawn in blueprint as my Character, it works, so i know there is nothing wrong with the code.

  • I also have another C++ function in the Controller that fires the Character's weapon and it works in the same manner. When called it will call the FireWeapon function on the Character. In blueprint this works fine.


    FUNCTION(BlueprintCallable, Category = StuffICanDo) void RotatePlayerCamera(float deltaYaw);

UFUNCTION(BlueprintCallable, Category = StuffICanDo) void FireWeapon();


oid Controller::RotatePlayerCamera(float deltaYaw) { PlayerCharacter->RotateCamera(deltaYaw); }//<----THIS FREEZES AT COMPILE IN BLUEPRINT

void Controller::FireWeapon() { PlayerCharacter->FireWeapon(GetMouseHit()); }//<-----THIS WORKS

I can't figure out why this is? Should I just update my project to 4.10? Would my models and other assets i got from the store become incompatible? It was the sole reason from me using 4.8.

EDIT: I forgot to mention, FireWeapon is called in blueprint when a mouse press event happens, and RotatePlayerCamera is called in EventTick (For Testing Purposes)

Product Version: UE 4.8
more ▼

asked Dec 22 '15 at 06:12 AM in C++ Programming

avatar image

81 2 4 7

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

1 answer: sort voted first

Found a work-around. I slapped a boolean to enable the rotation and in the Event Tick i check if its true. If it is it will rotate the camera. I dont know why it works this way, but it works.

To clarify the solution, for anyone else having this same issue, I made a boolean that allows me to rotate the camera. In the Tick Event i check to see if that boolean is true, if it is I rotate the camera to whatever amount.

You may closed this ticket.

more ▼

answered Dec 23 '15 at 05:53 AM

avatar image

81 2 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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