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"

UseControllerDesiredRotation broken in 4.7

I admit I'm still a little unclear on the intended usage of ControlRotation, for both player and AI characters, however there is clearly an issue introduced in 4.7 relating to this flag.

The AAIController::UpdateControlRotation() method has been altered, and now if there is no focus set, resets ControlRotation to be whatever the pawn's current rotation is. I was using the above flag and calling SetControlRotation in order for the character to be smoothly rotated to the rotation I gave, however since the value is now immediately overwritten, the character of course does not rotate.

Product Version: Not Selected
Tags:
more ▼

asked Feb 07 '15 at 01:07 PM in Bug Reports

avatar image

kamrann
2.1k 83 32 119

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

You've been using Controller::SetControlRotation to make sure pawn rotates smoothly? Why controlling pawn's rotation directly? I'm asking because current behavior is the desired one, we don't recommend micro-controlling AI. If you want your AI to look at a specific location you set its focus and let the underlying code do the heavy lifting. If you want to micromanage I recommend you did that on pawn movement component's level.

But I'm opened for suggestions :D

Cheers,

--mieszko

more ▼

answered Feb 09 '15 at 11:44 AM

avatar image

MieszkoZ STAFF
7.3k 223 57 412

avatar image kamrann Feb 09 '15 at 01:29 PM

I see, so then AAIController::SetControlRotation is not meant to ever be called externally? Since it internally overwrites it on every tick.

I'm not sure my use case can be handled by the existing controller focus code. The core of what I'm doing requires my character's head rotation to be decoupled from its torso/actor rotation. So while my character does have a focus point/direction, I don't want the character as a whole to be rotated towards it - I need to manually calculate and tell it what both its actor rotation and head bone rotation should be.

Would you agree that in this instance I really need to disable UseControllerDesiredRotation, and directly update my character's actor rotation, perhaps in UCharacterMovementComponent::PhysicsRotation? Thanks.

avatar image wukakuki Mar 13 '17 at 09:24 AM

uncheck AIController's "Set Control Rotation from Pawn Orientation" and don't set focus work for me. UpdateControlRotation will be disable

(comments are locked)
10|2000 characters needed characters left
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