Skip to content
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

Add support for one way platforms #7

Closed
britzl opened this issue Nov 8, 2018 · 2 comments
Closed

Add support for one way platforms #7

britzl opened this issue Nov 8, 2018 · 2 comments

Comments

@britzl
Copy link
Owner

britzl commented Nov 8, 2018

Perhaps add a way to configure collision groups so that they will ignore collisions in certain directions.

platypus.UP = x01
platypus.LEFT = x02
platypus.RIGHT = x04
platypus.DOWN = x08

platypus.create({
	collisions = {
		ground = {
			[hash("ground")] = platypus.UP + platypus.LEFT + platypus.RIGHT + platypus.DOWN,
			[hash("onewayplatform")] = platypus.LEFT + platypus.RIGHT + platypus.DOWN,
		}
	}
})

The config decides how to deal with contact_point_response and ray_cast_response messages.

@britzl
Copy link
Owner Author

britzl commented Nov 8, 2018

BTW, config.collisions.ground should probably be renamed to config.collisions.groups

@britzl britzl changed the title oll Add support for one way platforms Nov 8, 2018
@britzl
Copy link
Owner Author

britzl commented Nov 15, 2018

Fixed in 3.1.0

@britzl britzl closed this as completed Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant