Character - Change moviment style
Forum » General / Help » Character - Change moviment style
Started by: Thiago (guest)
On: 1257427515|%e %b %Y, %H:%M %Z|agohover
Number of posts: 3
rss icon RSS: New posts
Summary:
i want to rotate the character whe i press left or right - something like rts games
Character - Change moviment style
Thiago (guest) 1257427515|%e %b %Y, %H:%M %Z|agohover

i tried everything, aplying Torque, changing angular speed … but no success
anyone knows how to done this.
i just want the character to rotate a little when i click left or right.
some light pls

thank you in advance.

unfold Character - Change moviment style by Thiago (guest), 1257427515|%e %b %Y, %H:%M %Z|agohover
Re: Character - Change moviment style
Nic (guest) 1257433219|%e %b %Y, %H:%M %Z|agohover

Well if you're using the experimental character code that noone posted on the codeplex site, it rotates the player to match the camera's rotation every frame. Did you comment that code out? If not it would stomp any changes you're trying to make to the player's rotation.

unfold Re: Character - Change moviment style by Nic (guest), 1257433219|%e %b %Y, %H:%M %Z|agohover
Re: Character - Change moviment style
Thiago (guest) 1257537870|%e %b %Y, %H:%M %Z|agohover

"Well if you're using the experimental character code that noone posted on the codeplex site, it rotates the player to match the camera's rotation every frame."

where ?? i downloaded this
javascript:window.location.href='http://jiglibx.codeplex.com/Project/Download/FileDownload.aspx?DownloadId=64482';
in http://www.codeplex.com/JigLibX

and the there is just a force being aplied to it

 Matrix cameraRotation = Matrix.CreateRotationX(camera.Angles.X) *
                    Matrix.CreateRotationY(camera.Angles.Y);

                moveVector = Vector3.Transform(moveVector, cameraRotation);

                JiggleMath.NormalizeSafe(ref moveVector);
                moveVector *= amountOfMovement;

                character.CharacterBody.DesiredVelocity = moveVector;

                if (keyState.IsKeyDown(Keys.Space))
                    character.CharacterBody.DoJump();

No Rotation, just a Force !!!

I want something like this;
i push left in the keyboard and the character rotate, he stay stopped (no spacial movimentation), he just move his "look at", and whe i push up, hw will move ahead (the new rotated front)
Like the mouse movement in Counter Strike

someone has already done this ?

Thanks again in advance

unfold Re: Character - Change moviment style by Thiago (guest), 1257537870|%e %b %Y, %H:%M %Z|agohover
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License