Issues with camera's "auto-aligning" feature in EgoMoose's modded camera

This is a continuation of a previous post I made, where I technically am on my way towards that solution, however have a bug I need to tackle to count it as a solution.

As a quick summary, I’m working on a custom camera system for a system similar to what you would expect from a wallwalking/gravity controller game, and have found an existing camera system made a while ago by EgoMoose, however have found that, from what I can understand, when you look too steep up towards the sky, or down at the void and stop panning your camera around, the “auto-aligning” feature of Roblox’s standard camera that would typically slowly pan your camera to your face/back instead gets extremely confused at something and instead will violently spin the camera along the axis it typically would, however permanently as it seemingly has no eventual goal. (atleast i dont think it does as i havent beared through the flashing lights long enough to see if it eventually sorts itself after long enough)


My question is, does anyone know why this is happening, and how I would fix this behaviour? or as an alternative, a way to turn off this feature, such as a specific CameraType that still works with this module, so that the camera doesn’t attempt this and freak itself out? (i dont really care if i remove this feature to stop this behaviour right now and possibly come back to it later as, to be honest, except for maybe non-PC players which i will already most likely need to work on compatibility with later on, I dont think any PC user really relies/notices/intentionally uses this feature :sweat_smile:)


the video below shows what happens when i stop panning the camera VS when i do, shown by the anxious face UI in the bottom right where if i stop panning the camera with the right mouse button, any bugginess that should’ve been happening immediately starts/resumes

EXTREME FLASHING LIGHTS WARNING WHEN WATCHING THIS VIDEO, I had to set the ingame time to night once i realised how strong of a headache it was giving me :sweat_smile: the flashing lights/rapid spinning begin at 26 seconds and onwards, once i pass the trusspart which i used as a indicator for where i begin walking “upside down” relative to a standard camera’s view

External Media

i hate using medal for showing videos on here because of how sketchy the link looks once placed here, please lmk another way to send videos on here but i already use medal for everything else so I just sent it via them for now :man_shrugging:

1 Like

found the solution within this post

If you still want to use the follow camera you can find a more up to date version of the camera modifications here.

It does not support VR, but everything else should be good :+1:

The follow camera is an important UX feature for both mobile users and vehicle drivers:

1 Like

wow, i didn’t expect to get a response from the man himself :rofl: as for implementing the latest copy… how would i actually do that? i understand its something to do with the github site you sent, however im still moderately new to programming let alone the community and so i’ve hardly ever been on the site before, let alone know how to find the file for the modulescript to take and replace…

also, is it still the same/similar method to update the rotation of the camera’s perspective as the version i was currently using? or does the latest version require a new way?

It’s slightly different.

You’d now want to do:

cameraModule:SetTargetUpVector(upVector)

You’d want to call this method every time you change the upVector.

Here’s the placefile I used in the above video w/ the car if you want to see an example of it in use:
gravity_camera.rbxl (375.0 KB)

1 Like

sorry for pestering you again but i found another issue with the camera controller given here when the camera tries to rotate the player within first person/shiftlock that i tried to make a post for that has a poor explanation to what i believe the issue to be (as well as a temporary solution that I think would work) but got no response to

the rest of the reply below actually explains what I think is causing the issue, but if you’re understandably not working on this gravity controller anymore, I simply ask if you know a way to let me stop first person + shiftlock from forcibly rotating the character, so that I create a proper and compatible system to make these modes (particularly shiftlock) work with the rest of the camera controller? (as physics is the only thing I’m seemingly capable of doing alone as of my skills right now lol)


i’ll be mentioning shiftlock and the first person camera alot here, so for simplicity i’ll just be referring to them both as two ways to enter “locking mode” and put it in quotation marks to hopefully prevent any confusion

typically, under normal gravity you can imagine a white line directed straight down which is a direction obviously unreachable by the camera in any gravity due to limits applied on how far you can look up/down, and when my character in testing was standing parallel to this line (the direction of gravity was close to being “normal”, or close to as if standing on a roof) “locking mode” does actually seemingly work as intended.

image

(red area is where the limits prevent the camera from rotating up/down any further, and you can tell these limits would be the same even if the player was upside down)

the problem is that it seems the “locking mode” within the current camera controller doesnt take the new arbitrary direction of gravity into account, and so this “line” does not change direction accordingly with the new upVector, so instead of remaining parallel with the character (aka doing the correct math when trying to calculate how to rotate the character), “locking mode” instead becomes either very unresponsive in some directions and then very instant in others.

this means that at any angle where the “line” is no longer within the bounds of the camera’s pitch limits, (which arent the problem by the way) such as perpendicular to “normal gravity” (as if standing on a wall) your camera can easily pass this line which causes the “locking mode” to believe you very rapidly spun 180 degrees, spinning you around rapidly.


here is a video showcasing what it looks like ingame when this issue is occurring; i’ve created a physics based movement system and so the character doesnt flip instantly like the “locking mode” is trying, however you can still see what is happening

External Media

@EgoMoose

sorry for notifying you however i still havent gotten a response on a separate post about this issue and im 50% sure you either ghosted this second reply or just didn’t get notified about it

nevermind sorry for the notification i got the solution on the separate post

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