New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow jumping only when entity stands on something #98
Comments
Contact normal would need to be added to the collisions report. That's an important part of responding to collisions and should be added. |
heh, I agree ^^ |
That's how I would do it. Depending on your set up you may be able to fake the contact normal by checking if the player is above the platform or not. |
Right, I'll give it a shot. Faking it won't be possible, the level's too complex for that (too many objects). |
Hmm touches won't really work, I need that contact normal... if I e.g. have a terrain I can barely figure out whether the player stands upon it or is in the air. Can you drop a message here when you added that contact normal? That'd be neat.. thanks in advance :) |
Is that contact normal available by now..? |
Can't believe it's already been 3 weeks... I'll get this pushed out tonight. |
Awesome, thanks! |
Wiki Collisions page updated with the new |
Hi
My player is able to jump. Yet I want him to only be able to jump if he stands on something, so he doesn't jump in mid-air.
I thought about using collision detection, but if the player just walks over a cliff there's no "noticing" that he's mid-air. Another thought was to use
I could iterate through all touched objects, figure out the contact normal (how? no clue) and like this determine whether he's standing on something or not.
Does someone have a good idea on how to do this? Any suggestions would definitely be appreciated!
Kind regards,
Doidel
The text was updated successfully, but these errors were encountered: