How to lock 3d rotation to make a top down 2D

Hi, I got a rogue like template and was changing to 2D with paperZD and sprites but I can`t get the model to stop rotating when moving, can someone help me.

Hey @DeusaCremosinha!

So you should be able to open the player, and select the character movement component, and lock the Z axis on rotation! Just search “Lock” in the details window with the character movement component selected, and it should pop right up! :slight_smile:

Let us know how that works for you! :slight_smile:

Hello @Mind-Brain ! Thank you so much for answering. Do you mean those bellow? I already tried them but no luck

So doing this exact configuration does not change anything?

What about this one?

Nope, and when I hit enable Simulate Physics the Player just go static and can’t move

Nothing changes at all? Hmm. Strange. Can you show the component hierarchy? Like the list of components at default on the top left? This is typically how you stop rotations, but if the parent can rotate then the whole thing can rotate. If the Capsule Collider isn’t the parent, that’s the only way I can see this not happening.

Get back to us! :slight_smile:

Sure! You mean this one? btw the template is Survivors Roguelike - Multiplayer Game Template
and it was using the old axis mapping for movement, I changed the skeleton mesh to sprite and noticed this problem with rotation, I changed the axis mapping to the Enhanced Input action following this tutorial https://youtu.be/CMorzoSv7xI?list=PLMoNSvFYkp4ploHrLtIC2ymUisgeE3PEK&t=795

This is not a ‘good’ solution at all, but you could put a set world rotation node on event tick and force the rotation to always return to the orientation you want.

Use get world rotation and plug in the parts of that into the parts where you want the model to be able to rotate freely.

Also the way it looks considering it always rotates on animation implies to me that you’re using root motion, you could try disabling that (this way animation will not affect the rotation) or alternatively tweak the animation so he always stops facing the direction he was at the start.

Heeyy @Mind-Brain @Cestarian thank you so much for your help, I finally figure out how to fix it. After trying every checkbox available I found this settings where I changed from 360 to 0

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.