-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes in fov resolution #3071
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ public class LocalPlayerSystem extends BaseComponentSystem implements UpdateSubs | |
private LocalPlayer localPlayer; | ||
@In | ||
private WorldProvider worldProvider; | ||
private Camera playerCamera; | ||
public Camera playerCamera; | ||
@In | ||
private MovementDebugCommands movementDebugCommands; | ||
@In | ||
|
@@ -109,6 +109,8 @@ public class LocalPlayerSystem extends BaseComponentSystem implements UpdateSubs | |
private Config config; | ||
@In | ||
private InputSystem inputSystem; | ||
|
||
private MovementMode lastMode; | ||
|
||
private BindsConfig bindsConfig; | ||
private float bobFactor; | ||
|
@@ -489,10 +491,13 @@ private void updateCamera(CharacterMovementComponent charMovementComp, Vector3f | |
} | ||
} | ||
|
||
if (charMovementComp.mode == MovementMode.GHOSTING) { | ||
playerCamera.extendFov(24); | ||
} else { | ||
playerCamera.resetFov(); | ||
if(charMovementComp.mode != lastMode){ | ||
if (charMovementComp.mode == MovementMode.GHOSTING) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And by the way, what's the GHOSTING mode? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC it is literally the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, cervator is right. Previously it used to change the camera as per the mode in every loop. Now it changes the camera only when the mode is changed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, thank you. I can see where the "ghost" term comes from - going through walls. I wish we could find a term that was a bit more explicit in its meaning. But perhaps just a short comment beside the constant in MovementMode would help. I.e.
I checked and it seems the only mode that is somewhat ambiguous. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It's been used in cheat codes since back to Doom days There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh good ole Doom days :-) But yeah noclip may make sense if you're a seasoned gamer, but just the term on its own always stuck out to me as weird. We have a separate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, if we are brainstorming about this: immaterial mode, intangible mode, wisp mode, incorporeal mode... oh... I like incorporeal.. let me find some synonyms... bodyless, disembodied, discarnate (yuck!), spectral, spiritlike, ethereal, transcendent, supernatural, nonphysical... I guess incorporeal is the one I like the best, because I feel most people instinctively would understand that something incorporeal can go through walls. That been said, incorporeal might twist the tongue of some teenager and spiritlike is a more dumbed down contender. Except that some spiritlike modes, i.e. in World of Warcraft, still abide to -some- of the laws of physics, i.e. they must follow the landscape rather than fly through it. So. Still vote for incorporeal mode. It seems very clear, unambiguos to me. But sticking to ghost (plus comment) or switching to spectator (or maybe observer? watcher? naah) would be fine too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was also thinking that terms such as spectator, observer and watcher might have their use in specific game modes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yep, agreed.
|
||
playerCamera.extendFov(24); | ||
} else { | ||
playerCamera.resetFov(); | ||
} | ||
lastMode = charMovementComp.mode; | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
From the PR alone it seems unnecessary. If it's needed elsewhere it's good practice to comment your own PR about changes that might be puzzling. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The camera present here is needed in another system. Thats why made is public, though a getter method would have been better. But the camera is to be refactored in coming months so i just did it public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about you get it from the WorldRenderer then? It's the object that instantiates the camera in the first place and you can find it on the Context/CoreRegistry. No point in going through intermediaries if it can be avoided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that would be better. But
@In
annotation doesn't work onWorldRendererImpl
. I think i will need to get it directly from context. Will make the changes today :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting it from the Context is even better. In theory, having spoken with Immortius some time ago, we'd like to move away from annotation-based injection and use the context (and sub-contexts) more widely.
That been said:
doesn't work? It should.