levitateMotor isn't colliding properly
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: levitateMotor isn't colliding properly
It's worth bouncing ideas around with Allofich (R.D. here on forums), he's the author of initial climb system.
- MeteoricDragon
- Posts: 141
- Joined: Mon Feb 12, 2018 8:23 pm
Re: levitateMotor isn't colliding properly
R.D. = Research and Development?
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: levitateMotor isn't colliding properly
Haha could be.
- MeteoricDragon
- Posts: 141
- Joined: Mon Feb 12, 2018 8:23 pm
Re: levitateMotor isn't colliding properly
@R.D. Do you have any ideas on how to fix the Climbing system?MeteoricDragon wrote: ↑Mon Aug 27, 2018 5:59 pm Thanks! I have an update for you. Before I can program the player to climb onto platforms out of water, The climbing system needs to be fixed. It's accidentally working as it stands.
If I comment out the skill check in the ClimbMovement method, the player will continue climbing into the air and into the ceiling regardless of whether it's onto dry land from water, or dry land to dry land. The skill check failure is what allows the player to step onto the new platform, Lower climbing skill is essentially what causes the player to land on the new platform sooner. A high skill would make the player climb into the clouds along an invisible wall.
To fix this, there needs to be an actual check to run while climbing to see if the player would collide with the wall if he walks forward. So it can run repeatedly because the climbingMotor is setting the collisionFlag without checking the wall.
Also, the skill check system needs to be better used because when the skill check fails, the player just seems to slip a little bit.
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: levitateMotor isn't colliding properly
It might be best to PM him and link this thread, just in case he's not monitoring it.MeteoricDragon wrote: ↑Tue Aug 28, 2018 11:57 pm @R.D. Do you have any ideas on how to fix the Climbing system?
-
- Posts: 379
- Joined: Fri Oct 07, 2016 10:41 am
Re: levitateMotor isn't colliding properly
I don't really have anything to add about the Unity-side of things. Glad to hear you're making some progress on it. Inability to climb out of the water was the same problem I encountered with it.
I doubt it was intended to be that you can climb anything regardless of your skill. When I have time I'll probably make it so you can't restart climbing while falling or something like that, and I might be mistaken that classic lets you always succeed in climbing. I'll investigate it some more. But, we probably should first adjust DF Unity's fall damage before making it easier to fall while climbing. I haven't worked out how classic does fall damage yet, but DF Unity is a lot more severe about how much damage is done.
Well that wasn't intended. Glad you caught it.A high skill would make the player climb into the clouds along an invisible wall.
Yeah, I know about that. I think, though, that when I tested in classic, I could pretty much scale any wall even with a low climbing skill. I think it's because the climbing check runs so frequently that even if you fail a "roll", you succeed again right away even if you have a poor skill because the check happens so many times per second. Might be a bug in classic, or might be a problem with emulation timing or something. Since DF Unity is essentially doing the same, I just left it to come back to later.Also, the skill check system needs to be better used because when the skill check fails, the player just seems to slip a little bit.
I doubt it was intended to be that you can climb anything regardless of your skill. When I have time I'll probably make it so you can't restart climbing while falling or something like that, and I might be mistaken that classic lets you always succeed in climbing. I'll investigate it some more. But, we probably should first adjust DF Unity's fall damage before making it easier to fall while climbing. I haven't worked out how classic does fall damage yet, but DF Unity is a lot more severe about how much damage is done.
- MeteoricDragon
- Posts: 141
- Joined: Mon Feb 12, 2018 8:23 pm
Re: levitateMotor isn't colliding properly
Ok. Right now I'm using Physics.CapsuleCast the size of the player capsule forward to detect whether there are obstacles that the player will hit so that the code knows when it can make the player move forward. On some walls it works as intended and returns a RaycastHit. But on other walls CapsuleCast doesn't return a hit, so I have to use controller.Collision that was set by the initial controller.Move at the base of the wall. I can manually assign the collision status after the initial collision to a variable, but then I'd have to find out if there is anything in front of the player again, so I can tell the code to controller.move forward again.R.D. wrote: ↑Wed Aug 29, 2018 10:44 am I don't really have anything to add about the Unity-side of things. Glad to hear you're making some progress on it. Inability to climb out of the water was the same problem I encountered with it.
Well that wasn't intended. Glad you caught it.A high skill would make the player climb into the clouds along an invisible wall.
Yeah, I know about that. I think, though, that when I tested in classic, I could pretty much scale any wall even with a low climbing skill. I think it's because the climbing check runs so frequently that even if you fail a "roll", you succeed again right away even if you have a poor skill because the check happens so many times per second. Might be a bug in classic, or might be a problem with emulation timing or something. Since DF Unity is essentially doing the same, I just left it to come back to later.Also, the skill check system needs to be better used because when the skill check fails, the player just seems to slip a little bit.
I doubt it was intended to be that you can climb anything regardless of your skill. When I have time I'll probably make it so you can't restart climbing while falling or something like that, and I might be mistaken that classic lets you always succeed in climbing. I'll investigate it some more. But, we probably should first adjust DF Unity's fall damage before making it easier to fall while climbing. I haven't worked out how classic does fall damage yet, but DF Unity is a lot more severe about how much damage is done.
I'm stumped why the CapsuleCast isn't detecting some walls but is detecting others...
- Attachments
-
- I can climb up this platform from the water
- WallClimb03.jpg (45.15 KiB) Viewed 2479 times
-
- Rotate around to the left side of that tower, i can climb up this wall.
- WallClimb02.jpg (52.2 KiB) Viewed 2479 times
-
- Can't climb up this wall, unless i aim at the door.
- WallClimb01.jpg (55.66 KiB) Viewed 2479 times
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: levitateMotor isn't colliding properly
Could you send your work so far to a PR? I can merge to a branch and then we can all take a shot. Hopefully between the three of us we can work it out!
And it's OK if the branch is a bit messy and experimental, we all do that. We can either clean up code before merging to master or rewrite cleanly once problems solved.
And it's OK if the branch is a bit messy and experimental, we all do that. We can either clean up code before merging to master or rewrite cleanly once problems solved.
- Feralwarlord
- Posts: 117
- Joined: Sat Jul 29, 2017 10:08 am
Re: levitateMotor isn't colliding properly
Perhaps having a falling penalty to the check could work as it makes sense for a character with a high climbing skill to be able to recover from a fall while one with a low skill cannotR.D. wrote: ↑Wed Aug 29, 2018 10:44 am I doubt it was intended to be that you can climb anything regardless of your skill. When I have time I'll probably make it so you can't restart climbing while falling or something like that, and I might be mistaken that classic lets you always succeed in climbing. I'll investigate it some more. But, we probably should first adjust DF Unity's fall damage before making it easier to fall while climbing. I haven't worked out how classic does fall damage yet, but DF Unity is a lot more severe about how much damage is done.
- MeteoricDragon
- Posts: 141
- Joined: Mon Feb 12, 2018 8:23 pm
Re: levitateMotor isn't colliding properly
PR submitted.