I originally posted something similar but now I have encountered a new problem. The animations glitch when the player touches the ball as well after it touches the floating platforms. However, after touching the platform again it fixes itself. I am unsure how to fix the issue but my idea is to make a line collision so that the player will only have the sky animations before touching the line. However, I felt like this would be too tedious since I have to create a line on top of ever new object or platform I create. is there an easier way of doing this?
Below I attached the love file so it will be easier to understand what I mean.
The libraries I'm using are windfield as mentioned and anim8
I was able to improve my jumping animations using windfield, but I've encountered another issue
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
I was able to improve my jumping animations using windfield, but I've encountered another issue
- Attachments
-
- Test.love
- (76.26 KiB) Downloaded 77 times
Re: I was able to improve my jumping animations using windfield, but I've encountered another issue
It's because you're only checking collision against one collision class (Border). If you change it to this you get the same animation behaviour for the ball (once the simulation has settled):
There is another bug with this system in that the exit condition is triggered when you're colliding horizontally with the floating wall then walk away from it. This puts you in a state where you can move along the floor but you can't jump, and the animation switches rapidly between jumping and falling. You will want to update this to check the direction of the collision (also referred to as the collision normal). If the direction is up (i.e., (0,-1)) then it's ground, if it's any other direction it's either a wall or ceiling and you don't want those to trigger this animation state.
I don't have any experience with Windfield, but I had a 20 minute play around with it to see if I could fix this bug and honestly found it very fiddly for this use case and couldn't get the right result in that time. With a bit more persistence you should be able to get it to work though. If you don't have it already, here is the URL for the documentation: https://github.com/a327ex/windfield
Edit: Just realised the second bug I'm talking about is also the second one you mention in your post.
Code: Select all
if self.collider:enter('Border') or self.collider:enter('Ballz') then
self.grounded = true
elseif self.collider:exit('Border') or self.collider:exit('Ballz') then
self.grounded = false
end
I don't have any experience with Windfield, but I had a 20 minute play around with it to see if I could fix this bug and honestly found it very fiddly for this use case and couldn't get the right result in that time. With a bit more persistence you should be able to get it to work though. If you don't have it already, here is the URL for the documentation: https://github.com/a327ex/windfield
Edit: Just realised the second bug I'm talking about is also the second one you mention in your post.
Re: I was able to improve my jumping animations using windfield, but I've encountered another issue
Thanks for the advice honestly!. I had similar issues with the ball so I initially disabled it first so I can work on the glitches. I'll try to figure something put but hopefully I find a solution.
Who is online
Users browsing this forum: No registered users and 9 guests