Page 2 of 2

Re: Free Roaming (using Yaw and Pitch)

Posted: Thu Oct 13, 2022 4:30 am
by amorrow28
Very nice! Works well, and thank you for the mention in your table post. :)

(PS I noticed that you can pick player or camera, but for my version of the game it seems the options are swapped - if I pick camera it moves the player, and vice versa.)

Re: Free Roaming (using Yaw and Pitch)

Posted: Thu Oct 13, 2022 7:08 am
by Paul44
^ when/after changing that option, you must dis/re-enable 'Free roam' again.
(it has to do with the timer: did some experimenting with it, and it goes bananas quickly when changing properties "on the fly" while timer is already running)

ps: in a next (?) version, I'll look into nop-ing out the asm code, and manage entirely using lua (like in your script ~ should make the routine even more generic for other tablemakers to use); and copying 3 floats in 1 go (~ speed & "proper" updating ?)...

=>my primary focus now is updating tables that do not follow the "standard" approach, to see if my routine needs additional updating; and updating doc accordingly...

Re: Free Roaming (using Yaw and Pitch)

Posted: Fri Oct 14, 2022 1:01 am
by amorrow28
Ahh gotcha. I’ll have to take a deeper look at the code and how you swap targets on the fly like that!

just to clarify for anyone else reading this, the copying 3 floats at once thing is really only needed for Lua writes… your method of writing with assembly is as fast as it gets, actually! (And more importantly, it’s executed by the game engine in the same thread as the camera updater so in essence the game is forced to wait until your code injection finishes.) Personally, I do find the Lua method more intuitive though.