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"

Rotate Character To Position

Hello, In my project, character turns around (rotates) with using mouse input. (True FPS in Third Person Temp.). I want this character to sit down on a chair. So when he is in trigger box, he will move and rotate to the target point on the map using lerp. Moving works just fine but when key is pressed the character's body will rotate to wanted position, camera will not. So, whole character moves back to original position because camera is the main rotator. Is there any way to actually rotate the camera instead of the playercharacter? I will provide images of blueprints just in case. Thank you for your attention...

This is level blueprint which uses lerp. alt text

This is the event graph of the player which involves mouse controls and rotations

alt text

Product Version: UE 4.16
Tags:
untitled1.png (189.8 kB)
untitled2.png (420.4 kB)
more ▼

asked Jul 03 '17 at 01:59 AM in Blueprint Scripting

avatar image

Xenomorpheus_X
13 4 5 10

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

1 answer: sort voted first

Your camera controlled by mouse, so it uses PlayerController's ControlRotation, and you need to set it, not usual character rotation.

In lerp do GetPlayerController -> SetControlRotation.

more ▼

answered Jul 03 '17 at 04:46 AM

avatar image

redbox
4.3k 81 19 104

avatar image Xenomorpheus_X Jul 03 '17 at 03:53 PM

Thank You for replying! Using the way you said and adding a new rotator variable seems like it solved the problem.

untitled04.png (253.2 kB)
(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