Moving cardinally in relation to camera
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
Moving cardinally in relation to camera
So, this may or may not be possible, but I'm hoping it is, and to know how to go about it. So, I'm using The Zombie Killer's 3rd person camera ( http://forum.zdoom.org/viewtopic.php?f=37&t=46797 ) for a project, and my request will take a little bit of explaining... So, when the camera is enabled, it essentially acts like chasecam, but allows the camera to turn away from the player's back. What I want is when the player strafes or backpedals, they will instead turn in that direction and move forward, without turning the camera like it does when the player normally moves forward.
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Moving cardinally in relation to camera
Well, first off, have the latest version of the camera (it's near-identical to the built-in one now):
I'm not entirely sure what you meant, but if you're good with ACS (and use GDCC-ACC), you should be able to add an extra camera mode (chase_type) to the scripts.
I'm not entirely sure what you meant, but if you're good with ACS (and use GDCC-ACC), you should be able to add an extra camera mode (chase_type) to the scripts.
You do not have the required permissions to view the files attached to this post.
-
-
- Posts: 1355
- Joined: Mon May 06, 2013 8:02 am
Re: Moving cardinally in relation to camera
Could try setting the players angle to vectorangle (velx, vely) in a loop? Will be instant unless you do it incrementally though.
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
Re: Moving cardinally in relation to camera
I wasn't trying to make a new camera, I was explaining your camera to help with what I want to do. (Using Chaseplr=1 by the way) I want pack pedaling to instead rotate the player 180 degrees and move forward, without returning the camera to their backs, and same with strafing, but 90 degrees.The Zombie Killer wrote:Well, first off, have the latest version of the camera (it's near-identical to the built-in one now):
I'm not entirely sure what you meant, but if you're good with ACS (and use GDCC-ACC), you should be able to add an extra camera mode (chase_type) to the scripts.
EDIT: Also, your newest one doesn't work with 2.8.1, and I don't like developing with nightly builds...
Last edited by LanHikariDS on Tue May 31, 2016 11:35 pm, edited 1 time in total.
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Moving cardinally in relation to camera
Oh I know, I said camera mode. You'd basically add an extra mode that gives the chasecam that functionality.
So basically you want the player to move relative to the camera angle?
So basically you want the player to move relative to the camera angle?
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
Re: Moving cardinally in relation to camera
Yes, that's about right.
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Moving cardinally in relation to camera
There... really isn't any reason not to develop with a dev build (except in circumstances where they're broken, like when the scripting branch was first merged), but if you really don't want to for some strange reason, you should be able to safely remove the +ALLOWTHRUFLAGS flag from the Chasecam actor in decorate. That should make it work in the current stable build (I think)LanHikariDS wrote:EDIT: Also, your newest one doesn't work with 2.8.1, and I don't like developing with nightly builds...
As for the movement, I'll see if I can add that now
EDIT: Alright, here you go. There's still work that needs to be done, but it gets the job done for now. Use chase_type 2.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
Re: Moving cardinally in relation to camera
Well, it's simply because I typically develop for the version I play on, and I don't bother with downloading every development build. Just a personal nitpick, but whatever.
EDIT: I tried it, ZDoom just acts as if there's only the IWAD (I was trying it before integrating it into my project), no chasecam at all
EDIT2: Tried it in the newest dev build (With the flag), and when I used cam_mode 2, It was first-person, and I was unable to move.
EDIT: I tried it, ZDoom just acts as if there's only the IWAD (I was trying it before integrating it into my project), no chasecam at all
EDIT2: Tried it in the newest dev build (With the flag), and when I used cam_mode 2, It was first-person, and I was unable to move.
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Moving cardinally in relation to camera
that's weird, chase_active was on, right?
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
Re: Moving cardinally in relation to camera
... nope. Dunno why you would have that false by default, but whatever. Also, as for the moving issue, it was simply because I hadn't set the controls for GZDoom, so still my bad...
However, Chase Type 2 isn't what I was wanting to do, it just acts like ZDoom's chasecam. What I was wanting to do was, say, when strafing right, Doomguy will instead turn to face that direction (while the camera stays at the same angle), and run 'forward'. (Think Legend of Zelda or Super Mario 64)
However, Chase Type 2 isn't what I was wanting to do, it just acts like ZDoom's chasecam. What I was wanting to do was, say, when strafing right, Doomguy will instead turn to face that direction (while the camera stays at the same angle), and run 'forward'. (Think Legend of Zelda or Super Mario 64)
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Moving cardinally in relation to camera
That's exactly what chase_type 2 does, are you sure you're not accidentally using type 0 or type 1?LanHikariDS wrote:... nope. Dunno why you would have that false by default, but whatever. Also, as for the moving issue, it was simply because I hadn't set the controls for GZDoom, so still my bad...
However, Chase Type 2 isn't what I was wanting to do, it just acts like ZDoom's chasecam. What I was wanting to do was, say, when strafing right, Doomguy will instead turn to face that direction (while the camera stays at the same angle), and run 'forward'. (Think Legend of Zelda or Super Mario 64)
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Moving cardinally in relation to camera
Changing the value in CVARINFO does not change the value in-game. You need to change it in the console.
Since chase_type does not have "noarchive", it gets saved in your ini, which is why the value wasn't changing for you (it was using the value saved in your ini instead of the default value defined by CVARINFO).
Since chase_type does not have "noarchive", it gets saved in your ini, which is why the value wasn't changing for you (it was using the value saved in your ini instead of the default value defined by CVARINFO).
-
- Posts: 179
- Joined: Tue Aug 04, 2015 11:30 pm
- Location: Playing in the snow
Re: Moving cardinally in relation to camera
Okay, thanks. I added noarchive to it, tried it without ALLOWTHRUFLAGS, and lost the ability to turn it. Whatever. My final issue with the camera is that when firing, it's still aimed by camera angle, not player angle, so the player jerks to that angle when firing. I apologize for all the trouble, I originally asked how to do it, and end up having it done for me.
EDIT: Think I found it. Going to fiddle with it, see what happens.
EDIT2: Well, I can only assume it's hiding in 'tpcam.o', as what I pulled out of 'tpcam.acs' (The section starting in line 150) didn't seem to do anything...
EDIT: Think I found it. Going to fiddle with it, see what happens.
EDIT2: Well, I can only assume it's hiding in 'tpcam.o', as what I pulled out of 'tpcam.acs' (The section starting in line 150) didn't seem to do anything...
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Moving cardinally in relation to camera
tpcam.o is the compiled version of tpcam.acs. You'll need a copy of gdcc-acc in order to compile it and make changes.
The player rotating to the camera view when firing was intentional, but is easy to change. Try camera mode 3 in this:
The player rotating to the camera view when firing was intentional, but is easy to change. Try camera mode 3 in this:
You do not have the required permissions to view the files attached to this post.