Thanks for having a look A few followup questions.
First, are you sure this is the case? The reason I'm asking is because when I collide with the ceiling just jumping straight up into it my yvel is set to 0 and I immediately fall.
Second, if you're right and this is what's causing the problem does this mean that setting the y velocity to 0 is not the proper action to take when colliding with something from below?
Thanks again for responding
yet another collision question thread.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: yet another collision question thread.
I'm fairly certain this is the case, but I can't be sure. I'll look around more when I get some time.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: yet another collision question thread.
I haven't looked at the source, but if you are going up and hit your head you should set the y velocity to zero *if it's greater than zero, not if it's less'. Otherwise gravity won't be able to make you fall, as you keep negating it's effect by killing vertical velocity - you want to kill upward velocity only.
Who is online
Users browsing this forum: Bing [Bot] and 4 guests