Jump to content

Character Controller Problems...


Dogarooski
 Share

Recommended Posts

Hello.

 

I've been working on my own FPS movement script and I've been having trouble addressing a few issues.

 

The first problem I'm having is with wall collisions. Usually if you were to walk directly into a wall in an FPS game, you would stop. However, if you angled your camera's yaw a little bit, you would be slowly sliding against the wall. The problem is, when I do this in Leadwerks, it works for the most part but the camera is shaking a little and it doesn't glide smoothly against the wall. You can notice the same thing in the default FPS controller. Just keep moving into a wall at a small angle.

 

My second problem is kind of hard to describe. Pretend you had a crate that the player could jump on. Let's also say you jump a little higher than the top of the crate, so when you jump from the ground to the crate you will be falling a little before you land on the top of the crate (I hope I'm explaining this well enough). That's what you would assume would happen in most games. Let's picture the same scenario with the default FPS controller. You would jump from the ground to the crate (you still jump a little higher than the crate) but instead of reaching your peak height a few inches above the crate, in Leadwerks the player's velocity is cut-off when he reaches the top. He just stops at the top when his feet reach the top instead of going up and then coming back down. I really hope I'm explaining this well, because I don't even know how I would draw a diagram explaining it either tongue.png

 

My final problem is probably the biggest issue because it's the most noticeable. I don't know how you would go about recreating this, but at completely random moments in the game the player's movement will become extremely choppy and it will look as if the game is lagging. At the same time I'm getting over 60 FPS and looking around with the camera looks completely fine. I've tried turning VSync on and off, putting the camera attaching in the "Update World" instead of "Update Physics" but it nothing works. I guess you could just run the example and walk around a bit. Other physics objects are completely fine and camera looking is smooth, so this is very strange to me.

 

These bugs are all present in the FPS example controller so you can see for yourself what I'm talking about. Any help or suggestions would be appreciated!

Link to comment
Share on other sites

Thanks for the feedback. I actually really prefer the step/jump thing as it is now. It just sort of worked out that way, but it feels very natural to me.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

My final problem is probably the biggest issue because it's the most noticeable. I don't know how you would go about recreating this, but at completely random moments in the game the player's movement will become extremely choppy and it will look as if the game is lagging. At the same time I'm getting over 60 FPS and looking around with the camera looks completely fine. I've tried turning VSync on and off, putting the camera attaching in the "Update World" instead of "Update Physics" but it nothing works. I guess you could just run the example and walk around a bit. Other physics objects are completely fine and camera looking is smooth, so this is very strange to me.

 

I've noticed this too. I think it has something to do with the Lua Interpreter as my C++ FPS player code runs smooth as butter. If you have the professional edition, I highly recommend hard coding your player.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

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...