Scripts / Shift Camera Position?

Author
Message
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 3rd Jul 2017 17:39 Edited at: 3rd Jul 2017 20:34
Is it possible to shift the camera to the left or right? I know we can zoom.

The setcameraposition seems to move the camera and not adjust its position from the player by like an offset. Is there anyway to do this yet in Game Guru?
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GT 740

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Jul 2017 09:33
First time I read the thread title I thought your were complaining about the camera position ... then I saw the 'f'.

If you want to put the camera position in a specific spot wrt to the player then you just need to figure out the math. In reality you probably want to have the camera transition over time rather than simply jump from one spot to the next.
Been there, done that, got all the T-Shirts!
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 5th Jul 2017 00:59 Edited at: 5th Jul 2017 01:00
Noticed once I move the camera, it no longer moves when the player does. I'm trying to move it while in first person mode... unsure if that is possible.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GT 740
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Jul 2017 07:57 Edited at: 5th Jul 2017 09:30
Can't you just update the camera position every frame relative to the player coordinates? Or does moving the camera also update the player coordinates?

Maybe I'll have to have a play with this a bit.

Update: See attachment, press E and suddenly you are 200 units taller!
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Jul 2017 19:27 Edited at: 5th Jul 2017 19:35
btw, what were you hoping to achieve. If you do shift the camera wouldn't it look rather strange if you are holding a weapon because I doubt the weapon moves with the camera.

Hmm, more experiments come to mind ...

--- experiment over, the weapon does move with the camera!
Been there, done that, got all the T-Shirts!
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 6th Jul 2017 00:46 Edited at: 6th Jul 2017 00:48
This is just an experimental prototype. The UI is meshed from multiple sources. But put together with various layered sprites.

I was curious about offsetting the camera so its centered on the left side of the screen. I can fix up the weapon cross hairs in the gunspecs at another time. In the event I wanted to make the windows static to the way its presented in the screenshot id need to shift the camera a bit to the left so the FOV is centered.

I'm working on a prototype game that takes from the classic dungeon crawler types from DOS and old windows/mac.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GT 740

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Jul 2017 08:04 Edited at: 6th Jul 2017 08:54
There are some CameraPanel commands, I'll experiment with those and get back to you ...

... nope, we are missing a command to shift the camera centre wrt to the screen, at the moment the camera origin is fixed to the centre of the screen, for what you want to do we need a command to specify an offset amount, or alternatively to directly specify the X,Y % screen position to use for the camera origin.

Thinking about it some more, as the commands seem to have a camera number parameter, Lee is obviously working towards multiple cameras, maybe for screen-in-screen or multiple player views. If so and as part of the DX-11 update maybe suggest to him adding extra Lua commands to directly control where the camera(s) are rendered on screen and how much of the screen to use, that way the engine doesn't have to render to parts of the screen that you are covering up with the HUD elements.

If you can drag his attention to this thread I think as soon as he sees your images he will see the potential.

Been there, done that, got all the T-Shirts!
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 7th Jul 2017 00:07
Thanks for all your help!

I have far too many scripting related questions :/ I'm trying not to spam the board... cause im totally motivated with this new idea.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GT 740

Login to post a reply

Server time is: 2024-12-23 00:15:07
Your offset time is: 2024-12-23 00:15:07