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

Limit bounds doesn't update Z-axis #51

Open
jraicr opened this issue Mar 13, 2016 · 3 comments
Open

Limit bounds doesn't update Z-axis #51

jraicr opened this issue Mar 13, 2016 · 3 comments

Comments

@jraicr
Copy link

jraicr commented Mar 13, 2016

I'm prototyping a 2d platformer where you can switch to another world when pressing a key. In the Unity side I'm using a function to translate the player object to another Z-axis coordinates, keeping XY the same.

The problem: When the player object is translated to another Z coordinate, some limit bounds used in the PlatformerMotor2D to manage collisions aren't updating to the new coordinate. If you do some jumping, as soon as you touch the ground, the player object is translated back to the original position.

Issue gif

@jraicr jraicr closed this as completed Mar 22, 2016
@jraicr jraicr reopened this Mar 22, 2016
@cjddmut
Copy link
Owner

cjddmut commented Mar 22, 2016

It wouldn't be too hard to go through and ignore the z index from beting set. If you need collisions to change based on z then that'll be trickier (still easy) and a little bit more custom.

@cjddmut
Copy link
Owner

cjddmut commented Mar 22, 2016

I'll look into supporting this when I get some time. Otherwise it really wouldn't be difficult to quickly alter the motor to support this yourself :)

@jraicr
Copy link
Author

jraicr commented Mar 23, 2016

Although I think the limits should be updated such as Unity 2D collisions, I finally setup this behaviour in other way due to the nature of Unity and the community tools, I think this is the best thing to do.

Issue gif

I appreciate your efforts supporting this amazing controller. I would like to contribute as far as my knowledge allows me.

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

2 participants