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"

FPS Character rotation

Hi all.

I'm trying to do walking around a sphere but have a problem now. My character doesn't want to rotate properly, see a screen with character position on the top and in the bottom of a sphere: alt text

I'm using custom pawn without inherited components.

My blueprints: alt text

Product Version: Not Selected
Tags:
rotation.jpg (210.5 kB)
blueprint.jpg (428.8 kB)
more ▼

asked Apr 21 '15 at 09:39 AM in Blueprint Scripting

avatar image

nirvana17
25 2 4 6

avatar image Serellyn Apr 21 '15 at 01:50 PM

I don't really understand what the problem is, and I'm not the only one I see. Maybe make a video of your exact issue :)

avatar image nirvana17 Apr 21 '15 at 02:17 PM

added video, see below

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

3 answers: sort voted first

You need to uncheck Use Pawn Control Rotation on the FirstPersonCamera settings. This controller rotation is designed for a flat world as far as I can tell.

What you need to do is keep track of your own rotational input. For LookUp, you want to FIrstPersonCamera.AddRelativeRotation for the Pitch value. For Turn, you want to AddActorLocalRotation for the yaw. You don't need to worry about Roll. Basically, we want the camera to stick to the rotation of the capsule, but we'll rotate it locally and it should be the same as if on a flat world. You will, however, have to limit the relative Pitch so the player can't flip their head upside down, but you can figure that out after getting this other stuff working.

more ▼

answered May 08 '15 at 04:29 PM

avatar image

Cobryis
477 34 18 47

avatar image nirvana17 May 08 '15 at 08:44 PM

Many thanks! Perfect.

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

Currently you're using set actor rotation. But the default FPS template rotation is bound to the controller. So you need to use 'set control rotation' instead of set actor rotation,

more ▼

answered Apr 22 '15 at 10:07 AM

avatar image

Stormrage256
1k 83 75 118

avatar image nirvana17 Apr 22 '15 at 10:20 AM

But then LookUp (Mouse Y) input doesn't work. So i can move mouse only horisontally and when under the sphere Turn input (Mouse X) works opposite (Left becomes Right and otherwise).

avatar image Stormrage256 Apr 22 '15 at 10:31 AM

I'm able to use look up in my case using control rotation. If you're not able to get it working, Spyro's solution is the other alternative. You just go into character details and uncheck use controller yaw input and you should be able to use actor location and rotation like you've shown in the screenshot.

avatar image nirvana17 Apr 22 '15 at 01:47 PM

Could you tell more about your case? How you use and control rotation and look up in the same time? Uncheck use controller yaw didn't help. And LookUp modigy pitch, how it could help?

avatar image Stormrage256 Apr 22 '15 at 01:56 PM

You can first try a basic setup to see if it's working. Say like when pressing T, you get controller and set control rotation. For the rotation input for the same, create a new rotator variable and have custom values for pitch and yaw. Also in your character, have controller yaw input enabled. Can you check if you're able to achieve some random rotation in this scenario?

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

Sorry, don't really get your problem.

Maybe it's a problem with the default yaw scale of 2.5 in the player controller? You could try to uncheck 'use controller rotation yaw' in the class defaults of your pawn.

more ▼

answered Apr 21 '15 at 01:35 PM

avatar image

spyro
1.7k 106 117 233

avatar image nirvana17 Apr 21 '15 at 02:00 PM

Here is the video: https://www.youtube.com/watch?v=XLISCNigQzQ&feature=youtu.be

There is a point after which i cannot proceed move forward and should rotate 180 degrees to proceed

(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