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

Dangerous tiles hurt Tux even when they are blocked off #1175

Closed
HybridDog opened this issue Sep 29, 2019 · 4 comments · Fixed by #1741
Closed

Dangerous tiles hurt Tux even when they are blocked off #1175

HybridDog opened this issue Sep 29, 2019 · 4 comments · Fixed by #1741

Comments

@HybridDog
Copy link
Contributor

SuperTux version: v0.5.1-1937-g4d1c419ea
System information: lubuntu

Expected behavior

2019-09-29-113032_1920x1080_scrot
Tux does not get hurt when he jumps onto the rock

Actual behavior

The spikes kill Tux although they are blocked by a rock object, which is as high as one tile

Steps to reproduce actual behavior

See the screenshot, jump onto the rock

@tobbi
Copy link
Member

tobbi commented Oct 4, 2019

I feel like this is a collision rect problem where the collisiion rect of the spikes is maybe 1 or 2px larger than that of the block.

@HybridDog
Copy link
Contributor Author

HybridDog commented Oct 5, 2019

If I understand the collision system correctly, it firstly moves objects to target positions, which depend on the objects' velocities. Then it tests if the object at the target position intersects with a tile, and after that it tests collision with other objects.
http://github.com/SuperTux/supertux/blob/3827b0555c294e69f100525f7360b2b652362f4d/src/collision/collision_system.cpp#L494
If it works this way, Tux would also get hurt when his velocity is high enough and the rock is bigger than the spikes.

@tobbi
Copy link
Member

tobbi commented Nov 14, 2019

That doesn't seem to be a good idea. If that's indeed the case, we'd have to change it.

@HybridDog
Copy link
Contributor Author

Here's a similar problem:
When I press left while falling right of a wall and then release left before the end of the wall, Tux nonetheless gets hurt by the spike:
https://user-images.githubusercontent.com/3192173/105752916-2f40ec00-5f48-11eb-99d6-3bc4f7ea88b0.mp4

@weluvgoatz weluvgoatz linked a pull request May 2, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants