playMaker

Author Topic: Rigidbody 2D problem  (Read 1912 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Rigidbody 2D problem
« on: January 05, 2015, 06:07:18 AM »
Hi!
I don't know if this is a bug or if it's possible to fix it.

When the player is coming to the wall, it
will be able to just walk straight upwards
the wall. It's more like a steep slope.

Take a look at the video, so you can see what I mean.

I can fix this to set the player friction to 0.1 or
something, but then the player will be stuck
in the wall when he is flying.

This is a problem with Rigidbody 2D.
Rigidbody 3D is not a problem.

« Last Edit: January 05, 2015, 06:09:35 AM by Rabagast »
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Rigidbody 2D problem
« Reply #1 on: January 08, 2015, 07:58:47 AM »
Hi,

 The easy solution would be to do invisible colliders set to be vertical or even pointing at the player to prevent this behavior. these colliders would also be good spots to trigger different behavior like "climbing" animations and all.


could you isolate this case and send  a repro package? Maybe it's in your character behavior that the issue is, not in the physics itself.

 Bye,

 Jean


Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Rigidbody 2D problem
« Reply #2 on: January 09, 2015, 10:28:40 AM »
Hi, Jean!

I converted all the physics with 3D Rigidbody and colliders.
It's the same there, but I'm more satisfied now.

I was thinking that maybe if Raycast could work. For example if I'm coming to a wall slope which I set to a new layer called, Wall Slope, and then change the gravity or stop the movement, etc. What do you think of this? I used this in a similar problem. My player has a fall Trigger to check if the player is falling. The problem was when it's coming to a slope. The fall trigger couldn't touch the ground. I used a Raycast to check if the player is on the slope, then I disable the fall trigger FSM. It works very well. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no