Fulbo
Member
Hi everyone,
I wanted to ask about something that seems pretty advanced. I'm creating a platformer game, and was interested in being able to walk around an area while sticking to its surface/walls, adjusting my angle to match where I'm positioned. The following barebones mockups illustrate what I'm going for:
.1 .2 .3
I'm aware trigonometry would be highly involved in this, and I'm currently trying to study up on it. In the meantime, I was wondering if anyone had any suggestions (and possibly code examples) for how I could go about tackling this.
A technique I've seen a few developers use is having sensors at both the relative left and right of the player (angle wise), and checking relatively downwards until the ground is detected. Would that be my best bet, or should I try something else?
Regards.
I wanted to ask about something that seems pretty advanced. I'm creating a platformer game, and was interested in being able to walk around an area while sticking to its surface/walls, adjusting my angle to match where I'm positioned. The following barebones mockups illustrate what I'm going for:
.1 .2 .3
I'm aware trigonometry would be highly involved in this, and I'm currently trying to study up on it. In the meantime, I was wondering if anyone had any suggestions (and possibly code examples) for how I could go about tackling this.
A technique I've seen a few developers use is having sensors at both the relative left and right of the player (angle wise), and checking relatively downwards until the ground is detected. Would that be my best bet, or should I try something else?
Regards.