Fall Damage Bug

have a question or problem with some assets, inform the team to find a solution.

User avatar
simeon
Member
Member
Posts: 43
Joined: Mon Jun 10, 2019 10:26 am
Contact:

Fall Damage Bug

Postby simeon » Wed Jun 12, 2019 1:33 pm

Hello,

i have add ne map to my game but if i walk i die on some random places.

how can i delete the fall dmg or fix my problems

User avatar
transformes
Contributor
Contributor
Posts: 27
Joined: Mon Jul 24, 2017 2:31 am

Re: Fall Damage Bug

Postby transformes » Thu Jun 13, 2019 2:40 am

such a problem exists ,to turn off the feature , Resources>MPlayer>bl_FirstPersonController>Fall Damage uncheck

User avatar
jony12
Contributor
Contributor
Posts: 222
Joined: Mon Sep 24, 2018 12:46 pm

Re: Fall Damage Bug

Postby jony12 » Thu Jun 13, 2019 2:46 am

This bug has been a long time, and is not fixed.

User avatar
Lovatto
Admin
Admin
Posts: 1028
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Re: Fall Damage Bug

Postby Lovatto » Thu Jun 13, 2019 9:37 pm

Hi,

You guys have any way to reproduce this?
I mean, I know that it happen randomly, but have you found a way to reproduce it so I can fix it?

User avatar
jony12
Contributor
Contributor
Posts: 222
Joined: Mon Sep 24, 2018 12:46 pm

Re: Fall Damage Bug

Postby jony12 » Fri Jun 14, 2019 2:58 am

When you run and go through something.. curb, or other.
Just running through something.

User avatar
jony12
Contributor
Contributor
Posts: 222
Joined: Mon Sep 24, 2018 12:46 pm

Re: Fall Damage Bug

Postby jony12 » Sat Jun 15, 2019 3:17 am

Lovatto fixed this Bug.

User avatar
AndreyWindigo
Contributor
Contributor
Posts: 16
Joined: Wed May 15, 2019 6:14 am

Re: Fall Damage Bug

Postby AndreyWindigo » Sat Jun 15, 2019 2:05 pm

yeah, need fix

User avatar
skr2000
Contributor
Contributor
Posts: 147
Joined: Thu Feb 02, 2017 8:23 pm

Re: Fall Damage Bug

Postby skr2000 » Sun Jun 16, 2019 5:37 pm

Lovatto wrote:Hi,

You guys have any way to reproduce this?
I mean, I know that it happen randomly, but have you found a way to reproduce it so I can fix it?

Recode the fall damage function. Here's the solution:

Code: Select all

   [Header("Fall Damage")]
   public bool FallDamage = true;
   public float fallDamageThreshold = 10;
   public float fallDamageMultiplier = 5f;
   public bool falling;
   private float fallDistance;
   private float fallHighestPoint;

Add this code under if (!m_PreviouslyGrounded && m_CharacterController.isGrounded)

Code: Select all

         falling = false;
         fallDistance = fallHighestPoint - transform.position.y;
         if (FallDamage && fallDistance > fallDamageThreshold) {
            DamageManager.GetFallDamage (fallDistance * fallDamageMultiplier);
         }

Add this code under fixedupdate, when character controller grounded bool is false

Code: Select all

         if (!falling) {
            fallHighestPoint = transform.position.y;
            falling = true;
         }
         //Check if we moved higher for some reason
         if (transform.position.y > fallHighestPoint) {
            fallHighestPoint = transform.position.y;
         }


Also, dont forget to change getfalldamage to work fine

Return to “Support”

Who is online

Users browsing this forum: No registered users and 2 guests