Skip to content

fix particle collisions#2937

Open
RanPix wants to merge 3 commits intoPixelGuys:masterfrom
RanPix:fixParticleCollisions
Open

fix particle collisions#2937
RanPix wants to merge 3 commits intoPixelGuys:masterfrom
RanPix:fixParticleCollisions

Conversation

@RanPix
Copy link
Copy Markdown
Contributor

@RanPix RanPix commented Apr 18, 2026

there is still an issue if particles spawn inside the block, but i think that should be solved in a different pr

@Wunka Wunka moved this to Easy to Review in PRs to review Apr 19, 2026
Copy link
Copy Markdown
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad news: It still breaks sometimes, as you can see I spawned a ball on the left, but some particles phased through the rocks, and reappeared in small groups on the right:
Image

Comment thread src/particles.zig
inline for (0..3) |j| {
const move = particleLocal.velAndRotationVel[j]*deltaTime;
if (main.game.collision.collides(.client, @enumFromInt(j), move, v3Pos, hitBox)) |box| {
const skin = 0.0001;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did remove that from the other collision functions a while ago because it was causing different issues.
For particles we do however need them (unless we go fixed-point) due to accuracy loss when doing the relative-player coordinate thing.

@IntegratedQuantum IntegratedQuantum moved this from Easy to Review to In review in PRs to review Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants