playMaker

Author Topic: Sticking the character to a wall?  (Read 1645 times)

paradiseprime

  • Full Member
  • ***
  • Posts: 105
Sticking the character to a wall?
« on: October 22, 2019, 08:00:25 PM »
So I am trying to stick my character's feet to the wall. The character is running up the wall and I was able to get the character to face the direction of the wall but running up it with the feet flush [as physically possible] against the wall seems to be a struggle. The character is able to run along the X and Y axis relative to the wall.

I am using the physics engine and adding force to my character in the direction they are pointing I have no way of not having the character bounce off the wall. Is there a way around this?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Sticking the character to a wall?
« Reply #1 on: October 23, 2019, 10:57:15 AM »
Hi.
Maybe try playing around with Physics material.

Set bounciness to 0 and try some low values on the friction.

Another thing to fiddle around with is the gravity, you can change the direction/value of the gravity with Set Gravity or Set Gravity 2d

paradiseprime

  • Full Member
  • ***
  • Posts: 105
Re: Sticking the character to a wall?
« Reply #2 on: October 24, 2019, 11:36:44 PM »
Hi.
Maybe try playing around with Physics material.

Set bounciness to 0 and try some low values on the friction.

Another thing to fiddle around with is the gravity, you can change the direction/value of the gravity with Set Gravity or Set Gravity 2d

Yea I tried that and it kinda worked but it still feels inconsistent. Even when right against the wall I still sometimes push off slightly as I am running up. I am also trying to get the animations to sync up with the landing on the wall.

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: Sticking the character to a wall?
« Reply #3 on: October 25, 2019, 06:20:18 AM »
The problem is that a person running a wall is not possible according to physics, so you'll have to switch off gravity or isolate your character from the world's gravity and use constant impulses to have him go up or down along that wall.