Character Rotation

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
Gokhan137Cp
Posts: 6
Joined: 01 Jul 2011, 14:52
Contact:

Character Rotation

Post by Gokhan137Cp »

Hello! I've been researching codes online and that type of stuff on character rotation. The thing is that I still can't find out how, so I was wondering could somebody tell me how to rotate the character with your mouse as shown in many virtual worlds?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Character Rotation

Post by rjgtav »

Hi.

I'm sorry but your question isn't related with SFS at all. What you're asking is done completely on the client-side, which means, you don't need to do anything on the server-side. For rotating the character in such a way it is pointing to the mouse, you have to use some trigonometry. Unfortunately these forums are just for server-side help, so you have to use other sources (like Google, stackoverflow, etc.) to find the answers to this questions.

Good Luck :)
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
iCPblog
Posts: 8
Joined: 07 Sep 2011, 20:06
Contact:

Re: Character Rotation

Post by iCPblog »

Hello!

You're question is not SFS Related! But, You can always contact me on my twitter, And i can help! =)
-iCPblog
icpz
reecedogcp78
Posts: 71
Joined: 12 Dec 2010, 18:16

Re: Character Rotation

Post by reecedogcp78 »

Not SFS Related, however you could store the character position/rotation In a variable.
~Reecedog,

Experienced blogger with 100 thousand hits gathered.

New to SFS But also very good with it :)
Post Reply