op16
New vMember
Posts: 5
|
Post by op16 on Mar 21, 2023 10:14:48 GMT
Hello, I want to create a game where the player walks on certain surfaces that have low friction (such as ice). in this case the movement shouldn't respond immediately to changes, it should gradually change the velocity of the player in the specified direction. for example, if the player is standing still then there should be an acceleration in the direction he's facing (starting slowly until reaching maximum velocity) and when changing direction it should work the same.
how can I achieve that with invector?
|
|
|
Post by Invector on Apr 10, 2023 14:41:59 GMT
You can try adjust the smooth values
- strafeSpeed.animationSmooth and strafeSpeed.movementSmooth - freeSpeed.animationSmooth and freeSpeed.movementSmooth
this will look like ice skating
|
|
op16
New vMember
Posts: 5
|
Post by op16 on Apr 16, 2023 20:25:28 GMT
Thanks for the reply, I tried tinkering with the values. Although it does give some "feel" of ice skating, I'm aiming for something that will feel more like a character walking on a frozen surface. The main issues with changing only animationSmooth + movementSmooth is that the character tries to halt by making a really long forward step while slowing down over the duration and I want the character to actively change direction (including animation) and try to "walk/run" in the opposite direction to slow down the forward direction and move in the opposite direction. Also I need the slowdown to take much longer than the minimum amount allowed by movementSmooth (even 2-3 seconds from max speed). I'm not sure if it's possible without changing the code, if it's required can you perhaps point me the direction for where I should try modifying it to implement what I'm aiming for?
|
|
|
Post by Invector on Apr 17, 2023 13:08:53 GMT
Well you could also change the Capsule Collider Physics Material, although that's handled inside the script vThirdPersonMotor, so you will need to customize that to verify perhaps a tag and if the character is on that surface, change the material to a slippery one
|
|
op16
New vMember
Posts: 5
|
Post by op16 on Apr 19, 2023 18:26:44 GMT
sounds promising i'll try it out
|
|