Jump to content

How to make Player sway with each step? (Lua)


verbaloid
 Share

Recommended Posts

The default player walks steadily, but how do you script it to kinda sway down\sideways with each step\landing, the way they do in commercial games?

(I understand that there probably are different ways to implement it depending on C#, C++ or LUA, but since there's no separate section in this forum for Lua, I'm posting here).

Link to comment
Share on other sites

The Curve function is handy to make something like this:

 

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/math/mathcurve-r602

 

You can use this to bob the camera entity up and down and left and right smoothly over time. I personally get physically sick with modern games that do this but it can add some realism. I'll play around with the FPS script to see if I can get something because I'm sure many people would want this.

  • Upvote 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...