Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Fly Camera - 3.14 (Not 6.28)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
AntonVit
Advanced Cheater
Reputation: 0

Joined: 25 Jan 2014
Posts: 61

PostPosted: Mon May 15, 2017 11:54 am    Post subject: Fly Camera - 3.14 (Not 6.28) Reply with quote

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
View user's profile Send private message
SunBeam
I post too much
Reputation: 64

Joined: 25 Feb 2005
Posts: 4014
Location: Romania

PostPosted: Wed May 17, 2017 5:16 am    Post subject: Reply with quote

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.

_________________
More stuff on sb.deviatted.com. Work in progress.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 341

Joined: 09 May 2003
Posts: 20020
Location: The netherlands

PostPosted: Wed May 17, 2017 7:34 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message MSN Messenger
AntonVit
Advanced Cheater
Reputation: 0

Joined: 25 Jan 2014
Posts: 61

PostPosted: Wed May 17, 2017 1:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites