### Actor to stick to floors, ceilings and walls and be able to jump off

#### combosmooth

• Posts: 19
So i'm trying to figure out a way to get my actor to be able to stick to different surfaces, everything i try isnt working out amazingly. Any general advice would be good or even ideas on how i can do it properly

At the moment
i started with using the built Jump and run movement behavior and then tried to modify it to my needs
right now I am trying to do it based on some actor - tile collisions.
when the actor hits a right wall, i switch the gravity to (1,0)
left wall to (-1,0), ceiling to (0,-1) and set everything back to default when touching the floor.

it works fine for the floor, but my for walls my actor bounces off them and ends up floating away

#### Luyren

• Posts: 1855
i started with using the built Jump and run movement behavior and then tried to modify it to my needs
right now I am trying to do it based on some actor - tile collisions.
when the actor hits a right wall, i switch the gravity to (1,0)
left wall to (-1,0), ceiling to (0,-1) and set everything back to default when touching the floor.

it works fine for the floor, but my for walls my actor bounces off them and ends up floating away
See if inputting the actual gravity force in the set gravity block works for you. Instead of -1,0 for left wall, try -50,0 or whatever value you want for your gravity.
I have my Stencyl behaviors and resource packs available here: https://luyren.itch.io/

#### vicevicebingo

• Posts: 60
you knew left key for negate x-speed, right key for x-speed
no both key set x-speed to 0.

so  what if left right key will control y-speed?

try this trash block?
set velocity to ___ degree ___ speed

degree uses, direction of self also direction of self +180

then for gravity, point self towards 0 90 180 270 degrees.
very trash, right?

« Last Edit: August 08, 2019, 01:17:25 am by vicevicebingo »

#### combosmooth

• Posts: 19

ive switched to using a package from forge that includes walk and jump and wall jump behaviours among others have been modifying those to fit my needs
I have tried to setting my gravity to more reasonable numbers like 85 or -85 and that has been working a lot better
I have got it to where i can stick to walls and the ceilings, and be able to climb those walls vertically and move across the ceiling horizontally.
however whether i stick on the wall or bounce off of it is still very inconsistent. Wall jumps largely work but jumping from the ceiling doesnt yet.

I will try to post my code a little bit later when im home.