There is a TurretIndex field in the players table (a word value at offset 0x219 in the player struct) that indicates which turret is active (0: cockpit view, 1: first turret, 2: second turret ).
Thank you Jeremy! So that means we can have multiple turrets -- each with its own orientation. I wonder if the camera's orientation is updated by the game for each turret position too.
That is exactly the existing game behavior.blue_max wrote: ↑Fri Dec 06, 2019 7:39 pmI haven't played this mission yet; but let me guess... If we're in the turret maybe we see the hyperspace trails coming from one side (which would be correct); but then we see the hyperspace tunnel in front of us (which would be wrong). Is that the problem here?
Is there a way to tell when we're in the turret or in the regular cockpit? Something like a boolean or flag in XWA's memory?
I suspect that whether you're in a turret or the cockpit is less relevant than the difference between the camera facing vector and the ship's facing vector.
Yeah, I've been looking at how the hyperspace exit looks like in ROTJ from the links posted above and the trails begin long, they have a distinct bluish tint and then they speed away. This is what I've got:
Hmmm... has it always been like that?keiranhalcyon7 wrote: ↑Sat Dec 07, 2019 3:28 amThat is exactly the existing game behavior.blue_max wrote: ↑Fri Dec 06, 2019 7:39 pmI haven't played this mission yet; but let me guess... If we're in the turret maybe we see the hyperspace trails coming from one side (which would be correct); but then we see the hyperspace tunnel in front of us (which would be wrong). Is that the problem here?
True, hopefully the game updates the camera position accordingly. If so, then yes, the effect can probably be fixed.
I just checked and the camera gets reset to (0, 0) when the turret is activated, so I can't use that. I tried looking at the yaw/pith/roll in PlayerDataTable; but they correspond to the current craft's heading, not the turret.
Could you please elaborate a little bit on this point? I'm using the YT-1300 Corellian Transport from Prologue Mission 2 to test this, and I noticed that the "horizon" is rotated by 90 degrees with respect to the cockpit. Is that what you mean here? If I understand correctly, the turret is the one on top of the YT-1300; but I could be wrong (Is it on the side? Or the bottom?)
While I agree, this isn't the place to do that. The place to do that would be in the turret arcs for the Corellian transports.
I think the tunnel brightness at the perimeter is fine, but I would reduce the size of the white fade in the center. I might also suggest making the tunnel texture evolve over time, so that the tunnel itself doesn't look so static....only thing I think could make it better at that point is making the tunnel a bit darker, but other than that it look great!
I don't think this is possible right now; but maybe with some specialized hooks later?