SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing > Editing Help

Reply
 
Thread Tools Search this Thread
Old 3 Weeks Ago   #1
crazybark
 
crazybark's Avatar
Default how do you detect walls?

im trying to make a character who passively runs along walls (like knuckles climbing but with a different animation) and was wondering if you could detect walls to your side, and if so how?
crazybark is offline   Reply With Quote
Old 3 Weeks Ago   #2
Lat'
Stop it
 
Lat''s Avatar
Default

I suggest using the searchBlockmap function which allows you to do just that with the "lines" option. Just supply your player object with no x1, x2, y1, y2 and it will use the player's hitbox as reference instead which should make for accurate line "collision" detection.
From there all you'll need to do is make sure this line is actually a wall (by checking floor/ceiling heights and FOFs within the sector compared to the sector you're currently in).
__________________
Quote:
Originally Posted by MADVAL2 View Post
glad there is no Zero Two in this pack,i really get mad everytime i see Zero Two
Lat' is online now   Reply With Quote
Old 3 Weeks Ago   #3
crazybark
 
crazybark's Avatar
Default

thanks for the help
crazybark is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.