View previous topic :: View next topic |
Author |
Message |
AntonVit Advanced Cheater Reputation: 0
Joined: 25 Jan 2014 Posts: 73
|
Posted: Mon May 15, 2017 11:54 am Post subject: Fly Camera - 3.14 (Not 6.28) |
|
|
Hi all.
My problem - cant calculated new right coords for camera (but i create flying camera mod in many game, but this one wont work correctlty)
So game X, it made 360 rotation in 3.14 (not 6.28 as many games)
So i have wrong calculations when i use this formula for mov forward
X = X + cos*multiply
Y = Y + sin*multiply
multiply - float value
I made test for get Pi for full 360 rotation
fld dword ptr [edi+4] - camera cos value
fld dword ptr [edi+c] - camera sin value
fpatan
fstp dword ptr [Pi_test]
SO game give me value from 0 - 3.14
In X2 i create fly camera and there test give me Pi-test 0 - 6.28
Is anybody know how calculate coord with only 1 Pi (3.14)
In this X (where only 3.14 for full 360%)
Cos value go from -0.87 to 1.00 then to 0.87 and then change to -0.87 (after 0.87) its 1 rotation (360%)
Sin value go from 0.50 to 1.00 then to -0.50 and then change to 0.50 (after -0.50) its 1 rotation (360%)
|
|
Back to top |
|
|
SunBeam I post too much Reputation: 65
Joined: 25 Feb 2005 Posts: 4022 Location: Romania
|
Posted: Wed May 17, 2017 5:16 am Post subject: |
|
|
Yeah, STN's suggestion helped. Took him to the vet, the canary's feeling better now.
@Mods (or to whom it may concern): My point was simple - people dive into their own problems and output it here without detailing the actual context. Also, they're putting it like we are inside their heads and know exactly the issue, how it looks like, the vocabulary/terminology; as if we're doing what they do, therefore we'd be able to respond on the spot.
Do tell me if the OP's post makes sense to you (and not the ineligibility part; that I got; but the context?)
It's basically like those "anyone got bypass?" posts in General Discussions, without having specified the target, context, etc.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25291 Location: The netherlands
|
Posted: Wed May 17, 2017 7:34 am Post subject: |
|
|
I get the basic gist of it yes.
The game he plays apparently uses a value of 0 to 3.14 for a 360 turn, whereas his other game uses a value of 0 to 6.28 for a 360 turn
The solution is simple I guess. Use the same code as in the old game, but multiply the value by 2 before passing it to the calculation
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
AntonVit Advanced Cheater Reputation: 0
Joined: 25 Jan 2014 Posts: 73
|
Posted: Wed May 17, 2017 1:15 pm Post subject: |
|
|
Dark Byte wrote: | I get the basic gist of it yes.
The game he plays apparently uses a value of 0 to 3.14 for a 360 turn, whereas his other game uses a value of 0 to 6.28 for a 360 turn
The solution is simple I guess. Use the same code as in the old game, but multiply the value by 2 before passing it to the calculation |
Yes, multiply the value by 2 work fine.
For rotation 3.14 and for coord x2, now camera flying correctly, always flying where camera looking
Thank!
|
|
Back to top |
|
|
|