Teacher that's Me
if I want to improve my character movement for some reason like :
I can't reach to high places like hill (for example)
bepu4.jpg (21.75 KiB) Viewed 11957 times
sorry for many pictures (because my english is weak and maybe the picture tell u what i mean)
and if the character is stay in slope , he sliding down .
I want from him to stay stand only if the slope is very slope .
second thing I think it's same problem i don't know
bepu5.jpg (32.78 KiB) Viewed 11957 times
It's hard to walk on the sidewalk , only if I came with high velocity I can step on the sidewalk and if the velocity is not high I can't step on . that's it
If your capsule's radius is small relative to a 'bump,' it will not be able to ride over the bump. Additionally, if the friction is low relative to the gravity, the character will slide down slopes. The simple way to address the problems your seeing is to ensure that your capsule has a sufficiently high radius and to ensure that the character's friction with the environment fits the gravity.
You're getting closer to needing an actual 'character controller' though. The SimpleCharacterController handles these problems by floating around on a ray cast. It can step up and down on supporting geometry and handles the necessary velocity changes for movement. The full CharacterController in the development version can also handle this, along with a lot of other things the simple character fails at.
now I was play with some value like "playerCapsule.LinearVelocity += new Vector3(0, -10, 0);" I use this line to increase the gravity to the player , if I don't use these code the player will fall slowley and .
if I leave the value = -10 , the player will fall like real and if I move the player then stop it he will stop quickly and then I will have no sliding when I stoping. with these value I can't step on the sidewalk easily
if I leave the value = -1 , the player will fall slowly and if I move the player then stop it will stop slowly then I will have a slidign until he stoped . with these value I can step on the sidewalk easily.
Norbo I was read some codes from the SimpleCharacterController but there is many thing in it this is not the SimpleCharacterController it's a ComplexCharacterController .
can you help me with the code I need to step on the sidewalk , I don't know if the "supportHeight" is what I need and other thing?
NOW what is I need to go over some small objects ? thanx T
if I don't use these code the player will fall slowley
If you have a high linear damping set, it will remove tons of momentum from the character. That will cause it to fall slowly. If you want to stop a character from sliding on the ground, a better approach is to manage the velocity like the SimpleCharacterController does.
can you help me with the code I need to step on the sidewalk , I don't know if the "supportHeight" is what I need and other thing?
NOW what is I need to go over some small objects ? thanx T
I'd need more specific questions to be of much help. I would recommend just using the SimpleCharacterController and SimpleCharacterControllerInput directly to begin with, and make any modifications as you find them to be necessary.
there is many thing in it this is not the SimpleCharacterController it's a ComplexCharacterController
It's all relative- compare it to the normal CharacterController and its supporting systems
I lost with this variables !
can u give me a summary of what I need , actually I'm not need all code in the "simpleCha.." because it's many thing on it , instead of that I want to work with what I encounter with and then learn step by step , like that I can't understand all thing at once my teacher
right know if give me a part from these code "simpleCha.." that I want it will be helpful for me , because I don't know for what some code be using for ???
I need a part(code) that can help me to step over the sidewalk with easily .
I would suggest just using the SimpleCharacterController, unmodified. You don't necessarily have to understand every single line of code in it to make use of it, just like you don't have to understand how the whole engine works to use entities and such
The SimpleCharacterControllerInput pretty much shows everything that needs to be done to use the SimpleCharacterController.
If you have a specific question about something, I'll try to answer it
Just copy and paste the SimpleCharacterController and SimpleCharacterControllerInput classes. There's nothing special about them. You'll have to make a few modifications here and there with how it collects input depending on how your game works, but it should be pretty obvious- everything that needs to be changed should throw out compiler errors.
Note that there's nothing important about how the SimpleCharacterControllerInput class works- you can move stuff around at will if it fits your goals better.
ok I need to know some things before use it .
do u mean import those to class to my project ?
I have already codes that move my player with joysticks , do u mean build another one ?
and I have a camera that is behind the player and rotate with player + rotate up and down(arc ball camera), like (resident evil 5).
I mean do whatever you want to get the code into your project The BEPUphysicsDemos is not a library project, and the vast majority of it isn't something you'd want to reference. Copying the content of one or two classes is easier and more direct.
Use whatever input handling you want. The SimpleCharacterControllerInput is not important; the way it talks to the SimpleCharacterController is. You can adapt your existing system to talk to the SimpleCharacterController directly. That would be fine.
now the simpleCharacterController in my project , and I rename the name space to my projcet name space .
after that how can I use this class in right way to have a real character movement ?
Take a look at the SimpleCharacterControllerInput for an example. After the character is in the Space, you can set the character's MovementDirection to some normalized value or zero to make it move/stop, and tell it to jump.
ok nothing until now is hard , I just replace my old code with new
now in this line "SimpleCharacterController(new Vector3(0, 100, 0), 55, 25, 20, 85);" the second parameter"Height" do u mean in centimeter or what ?