My character sticks to walls. I'd rather him fall down them.

atmosgames

New member
Any ideas as to what I can do to ensure my character will slide down the walls as opposed to stand on them [image 1] I've also noticed that when my player is in this position, he can't jump. I'd much rather the player always be able to jump, even in sticky positions like this (for example, falling into a pointed crevice and being able to jump out of it [image 2]

Image 1
wallGlitch.jpg

Image 2
stuckInvalley.jpg
 

Justin

Administrator
Staff member
Does your character have the slide ability added? You can adjust the slope thresholds and forces at which this ability activates.

I've also noticed that when my player is in this position, he can't jump.
Within Jump.CanStartAbility it always returns false if the slope is too steep. I'll make this an option for the next update but in the meantime you can just comment out this line (147)
 

atmosgames

New member
Thanks for the response Justin. I'll give this a shot and see what happens. So far after adding this it doesn't really do what I was hoping. I can still run directly into the face of the cliff and the slide will stop. Additionally, the slide allows me to travel directly down the cliff face and not get hurt. In real life, if I jumped off a cliff and hugged the face, I would still tumble to my death. Thoughts?
 

Justin

Administrator
Staff member
Have you tried adjusting the forces/slopes to a greater magnitude? With a large enough force the slide ability should propel you down a slope, for example:

slide.gif

Additionally, the slide allows me to travel directly down the cliff face and not get hurt. In real life, if I jumped off a cliff and hugged the face, I would still tumble to my death. Thoughts?
For this I would subclass the slide ability to take into account the slope/speed that you are sliding and when the character stops sliding call Health.Damage to decrease their health.
 

atmosgames

New member
Justin, I've been able to replicate your gif. However, walls in general are still very sticky and buggy. I figured the best way to go about explaning is a quick video (be sure to turn sound up, my mic volume was pretty low sorry):


Any help would be amazing. Thank you!
Thomas
 

Justin

Administrator
Staff member
Thanks for the video. It looks like there are three issues:

1. Cannot jump while running into the slope: This likely deals with the jump ability being prevented when the slope angle is too steep. Did you make the code change to the jump ability to allow the character to jump and the character still doesn't jump in that situation?

2. Jumping with sloped objects: On the jump ability there is a Min Ceiling Jump Height parameter that could be preventing the jump. If you set this to -1 the character will always be able to jump even if there is an object directly above it. When the character hits a ceiling their vertical velocity is cancelled out and they will start to fall back down, unlike horizontal collisions where they move in the direction of the slope. Having the character follow the slope with vertical forces is something that I can add to a future update.

3. Running into the slope: Does the character still stop and run into the wall if you increase the force on the slide ability?
 

atmosgames

New member
Hey Justin, I will try #1 and #2, although my primary concern for my game is #3. I've tried adjusting the values to no avail. Here's a quick video showing you what happens:

 

Justin

Administrator
Staff member
Yeah number 3 doesn't look good. Are you able to reproduce it within the demo scene or send me a repro project? I can take a closer look at the cause. If you're sending a repro project you can send it to support@opsive.com
 

atmosgames

New member
Justin, I will double check with the demo scene, and see if I can get you a repro project that isn't massive :) Right now it's pretty big.
 

atmosgames

New member
Hi Justin, thanks so much for your help as usual. So I received the new script via email for Slide.cs, and it definitely works, however, I can still cheat by tapping the edge of walls. I've also still been able to get the player to stick. Please see video:


I guess I'm confused: is it not possible to just remove player friction altogether if a surface is greater than the Slope Limit? Instead of "sliding", it would be fantastic if the player did not engage at all in the surface if it's greater than the slope limit. Almost like if a soapy, slipper ball tumbling down the edge of the cliff. It would not slow down at all if it touched an edge.
 

Justin

Administrator
Staff member
Ah, I think that's a separate issue. Try removing the AbilityStarted method and change OnGrounded to:

Code:
            if (grounded) {
                m_SlideSpeed = 0;
            } else {
                StopAbility();
            }
I guess I'm confused: is it not possible to just remove player friction altogether if a surface is greater than the Slope Limit? Instead of "sliding", it would be fantastic if the player did not engage at all in the surface if it's greater than the slope limit. Almost like if a soapy, slipper ball tumbling down the edge of the cliff. It would not slow down at all if it touched an edge.
Under the General settings of the ability you can disable Allow Position Input which will prevent the character locomotion from contributing to the movement at all. This will prevent the character from being able to jump off the slope though by moving in the opposite direction of the slope.
 

atmosgames

New member
Hi Justin thanks again for the response. None of these solutions do anything for me unfortunately. Regarding "cheating" by sprinting into the walls, I can still do that, even with the script change. Please see video. As for disabling positional input, this has the desired effect, however, it essentially freezes the player, not allowing them to move at all as they fall. All I need is for the player to no engage with the surface of the wall, not force them to not move at all. Here's what I mean:


I'd love to send the full project, and have you take a look, and perhaps even have you push a solution. It's 20gb or so, but I can add you on GitHub if you don't mind. Let me know and I'll send you an invite via email.
 
Top