Problems with Enum.RotationType.CameraRelative

No matter what I do, my custom rig for my new game has rotation issues after respawning with Enum.RotationType.CameraRelative on. I’ve tried reactivating it, recreating the rig, turning off all systems and reactivating, but to no avail.

https://gyazo.com/1b2d61f74f25e4f7482012a0abca68d6

Anything I can do about this? Is this a Roblox bug?

3 Likes

Its impossible to say if it is a Roblox bug or not from this information alone. The most we can assume is that there is state being stored somewhere that is causing the humanoid not to rotate the rig.

When you recreate the rig, do you call the method originally used to create the first rig? Does this function take any arguments or use any upvalues/globals that could be affected by the previous rig dying? If your code doesn’t have a high degree of encapsulation then this will be hard to do, and likely be the cause of this issue.

If the rig is being completely remade the exact same (not just the parts, but also how input is connected and handled) then it is a Roblox issue. I’d try making another rig and see if it is broken on all humanoids and if there is a pattern that could help identify where the bad state is.

I’d think that generally an Instance would store most of its own state, so that is why recreating it the exact same should almost always work, even if it was a Roblox bug. The fact that recreating it isn’t helping makes me think that the bad state is in your code somewhere and being transferred over to how the new rig is handled.

I’ve also tried setting the character to nil before setting a new rig with a delay. My code is organized with global functions when needed, so that can’t be the problem; it only happens within a few lines. The method of recreating the rig is the same as the original method, and nothing is affected by the previous rig’s death. I’m still trying more to try to find if there is any way around this, like turning off relative rotation the same time as the death, then re-enabling it.

I would recommend just making a more powerful camera or controller. You end up remaking a lot of base scripts if you want a completely functional and customizable game.

The gif doesn’t play for me, either. :thinking::thinking:

1 Like

True. If you look at my most recent post, it was a reply to one of the my threads you commented on. I ended up having to convert move vectors to cardinal and primary directions and do a lot of other math just to be able to have a clean linear turn speed.

Yes, the point of base scripts are so that people who are lazy or people who are beginner coders or people who dont want to change its function can use it in their games. All games should have had no base scripts at all (which would be a great idea) in order to get people familiar with cameras and movement so that games can have better controls than the ones roblox offers. The problem however is that then characters will more commonly not be the avatar the player has chosen. They are also difficult to modify and sometimes do not fit with whatever youre going for.

My camera is entirely custom and made from scratch, and I would say it was pretty recent.
Maybe there’s something I should be doing in it that I didn’t know?

Edit to topic info: Replaced gif file with the gyazo link.

Yes. In fact, I also ran into some other core, engine obstacles, such as Roblox having a degree system that goes from -180 to 180 rather than 360 degrees. I ended up having to convert it to a 360 deg system given that the delta calculation fell within these boundaries. You can look at what I did here if it ever pertains to you.