Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Weird jumpy problem


Appo

Recommended Posts

hey, this is kinda hard to explain but basicaly i want my character to be able to slide under a obsticle that you can't get under if your walking, but a problem occures if you walk up to it, the player seems to jump back a bit. I think it's to do with the slope part of the code as the left and right collision detectors are not colliding with anything but the main player (green sphere) is, could anybody please suggest a way to fix this without having to resize or move the sensors? any help would be appreciated :)

to recreate what i mean place an obsticle thats just a bit lower than the players head so he can't walk past it

Link to comment
Share on other sites

the mfa is the sonic worlds engine so i did a vid although the problem doesn't look that bad on the vid (because of quality) it actully looks worse in the mfa, anyhow

th_Movie-1.jpg

BTW i'm not pressing jump, thats the problem i'm on about

Link to comment
Share on other sites

Ok, so it's angle calculation that's dicking it up. I see. What's happening is that when the right angle detector reaches the position of the blocks, it's brought up like normal and it sees the blocks because the gap is smaller than what it normally detects. It's not detecting it as a wall because the wall sensor is conveniently too low for it to notice the walls. So that's why it's seeing as a slope of that magnitude rather than as a zero slope

I think bringing the wall sensor up to eye level whether by positioning or stretching will fix it. I'm not sure. If that's unacceptable or if it doesn't work, you'll probably have to find a way to account for gaps when doing angle checks... and that could be very messy.

I think currently angle detection works by picking the sensor up and basically dropping it until it finds something. If you wanted to do it more cleverly, you could have it reset at foot level every frame and then either start moving up or down depending on what it finds.

Link to comment
Share on other sites

yeah i think the easiest way is going to be moving the wall sensors up a bit, i didn't want to play with the sensor posistions too much but it seems like thats the easiest way to do it. Thanks for the help :)

Link to comment
Share on other sites

I had this problem when I was trying to help Sparks shrink the sensor system of Worlds. It's because of the green circle mask; you need to shrink that during slides when you can go under smaller obstacles so that it doesn't collide with the minimized space.

Link to comment
Share on other sites

i tried shrinking the green sphere but he just walks right past it now moving the posistion of the wall detectors up slighty seems to work, although i deleted one or two lines of code in the event group 'Slopes' and that sort of did somthing to help but now it wouldn't detect slopes properly so i guess i'll just have to position the wall sensors higher and bring them back down if you duck, thanks for the help though :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...