Problems with modifying gravity direction and character rotation.

Character rotation and gravity must change accordinng to line trace impact normal here:

but the chractter (and camera) must always look at the map from sime direction. Every time I change rotation, camera looks froom opposite way. When I dissable Z axis it won’t work properly at all. I, tried to solve it by multipying the vector by 2:


So with this the rotation, still not solved, just keeping the camera at same direction. As I understand stuff here this type of changes in rotation does not even bother Z vector but it wont work when I disable it. I tried similar thing sor that to but nothing worked. I am sure I musendrstanded some things here.

This is the current nodeset, after I delete all my broken attemps:

And this is thee currrent gameplay:

As you see gravityy is not applying from the right direction. Character moving slover somewhere. Rotation is not always setting right etc.

Can’t you just set the camera rotation to 0 each time or better yet make the camera use the controller rotation and never change it. I am asking. I’m not really sure if that would work.

1 Like

Well, some usefull advices here :slight_smile: I think it might worth a try. I am quite a rookie, I am unfamiliar with most technical stuff, didn’t even tought I can use a controller. Yet still I have problems with gravity etc. However this new approach might solve them as well.

Can you detail how I am supposed to do that? You saw the problems already, I cannot impelent this approach yet, mabe you can give me some more hints :slight_smile:

Check this simple setup:

As long as the Use Pawn Control Rotation is checked the camera will always take the rotation of the controller regardless of how the pawn is rotating.

Uncheck it and you’ll see that the camera will rotate with the pawn.

I am sure you can adapt this to your custom pawn.

2 Likes