Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Getting stuck on nothin on the Platformer - Basic PHYSICS
Started by mylegguy721 Dec 23 2014 02:45 PM

2 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

mylegguy721

[GLOBAL: userInfoPane.html]
mylegguy721
  • Enthusiast

  • 44 posts
  • Corona SDK

I was testing out Platformer - Basic PHYSICS, and when I was moving around the character would occasionally get stuck as if they hit a wall, but nothings there. I just started to work on my own game and hoped it would fix itself. It didn't. Does anybody know why this happens and how I can prevent it? The places I get stuck at are not the same places every time.

 

I took a little video if you don't know what I'm talking about.

http://youtu.be/cD7FMhBWiWk

First I show my game, then I show the original Platformer.



[TOPIC: post.html]
#2

Azmar

[GLOBAL: userInfoPane.html]
Azmar
  • Contributor

  • 140 posts
  • Corona SDK

Yes so the physics on your main character I'm guessing are just 4 points "square". The physics need to change to 8 points where the edges have a very small 1-3 pixels diagonal shape this way it won't get stuck on any walls. This is normal box2D feature and this methods fixes it. The final shape would still be a "square" but each vertex (your 4 points) will now have like 2 vertex's very close to each other.

 

Sorry if I am not describing it very well.



[TOPIC: post.html]
#3

mylegguy721

[GLOBAL: userInfoPane.html]
mylegguy721
  • Enthusiast

  • 44 posts
  • Corona SDK

Ok, that looks good. How do I make that happen?




[topic_controls]
[/topic_controls]