levitateMotor isn't colliding properly

Discuss coding questions, pull requests, and implementation details.
User avatar
Interkarma
Posts: 3495
Joined: Sun Mar 22, 2015 1:51 am

Re: levitateMotor isn't colliding properly

Post by Interkarma » Mon Sep 10, 2018 10:48 pm

I think so, yeah. Although it's hard to reproduce, so it might have been there earlier.

With the latest advanced climbing changes where you can hold onto wall, I find very slowly mantling top of climb can help make it happen. I just gently tap W near the top to get right on the edge, then go over top in one movement.

If you don't have any luck, I'm happy to help chase it down when I can.

Prester Lewin
Posts: 66
Joined: Thu Sep 13, 2018 2:16 pm

Re: levitateMotor isn't colliding properly

Post by Prester Lewin » Thu Sep 13, 2018 3:09 pm

I've had the same issue as Pango when climbing a strictly rectangular part of a building in a city. Get to the top and there's about a 1 in 5 or 10 chance of liftoff. Different buildings, different towns. I think it seems to place me at the NE corner of the grid square containing the town if that makes sense, so the compass says I'm looking SW. Maybe I'm at the min or max co-ords?

Happening in Win #132 64 bit.

User avatar
MeteoricDragon
Posts: 137
Joined: Mon Feb 12, 2018 8:23 pm

Re: levitateMotor isn't colliding properly

Post by MeteoricDragon » Sun Sep 16, 2018 8:13 pm

This issue is now fixed in the latest group of updates I'll be submitting via PR to Interkarma.

User avatar
MeteoricDragon
Posts: 137
Joined: Mon Feb 12, 2018 8:23 pm

Re: levitateMotor isn't colliding properly

Post by MeteoricDragon » Fri Sep 21, 2018 3:44 am

I've got good news, I figured some stuff out but the problem remains. OnControllerColliderHit in PlayerMotor isn't sufficient enough to detect collisions between the player and colliders while LevitateMotor is being used, because controller.move isn't used 100% of the time. OnControllerColliderHit is only called if collisions occur when the controller.move method is called.

I was able to collide with a platform while levitating as long as I was moving in a direction, but if staying still, the platform moved right through me. The reason for moving platforms working when walking on the ground is that the gravity is applied through controller.move.

User avatar
Interkarma
Posts: 3495
Joined: Sun Mar 22, 2015 1:51 am

Re: levitateMotor isn't colliding properly

Post by Interkarma » Fri Sep 21, 2018 4:05 am

MeteoricDragon wrote:
Fri Sep 21, 2018 3:44 am
because controller.move isn't used 100% of the time. OnControllerColliderHit is only called if collisions occur when the controller.move method is called.
That's correct, it's the known limitation I was referring to up in the second post. At the time, I didn't realise you were looking at a different problem altogether. We've come full circle now. :)

I'm honestly not worried about it right now, so don't stress it. My main focus is just getting all the gameplay features lined up and minor stuff like this can be fixed down the track.

User avatar
MeteoricDragon
Posts: 137
Joined: Mon Feb 12, 2018 8:23 pm

Re: levitateMotor isn't colliding properly

Post by MeteoricDragon » Sat Sep 22, 2018 3:10 am

@interkarma I've got a hack that makes the player get pushed if he's levitating from any side! https://github.com/Interkarma/daggerfall-unity/pull/902

User avatar
Interkarma
Posts: 3495
Joined: Sun Mar 22, 2015 1:51 am

Re: levitateMotor isn't colliding properly

Post by Interkarma » Sat Sep 22, 2018 3:44 am

Cool, I'll check it out. :) I've read about the "vibration" hack before, but it seemed messy. Your implementation seems fairly straightforward however. I'll try it out and see how it plays. Cheers!

Post Reply