Fyrox icon indicating copy to clipboard operation
Fyrox copied to clipboard

FPS Tutorial: particles appear on opposite side of barrel

Open Barugon opened this issue 4 years ago • 3 comments

The particles for bullet impacts appear on the opposite side of the barrels. It's possible that I might have done something wrong but I checked my code against what is here on github and didn't see any mistakes (it's written against master and uses the framework instead of a custom game loop). Anyway, here is my code: fps_tutorial.zip

Here's what I'm seeing: Screenshot from 2021-12-22 17-43-32

Barugon avatar Dec 25 '21 10:12 Barugon

The tutorial code here has the same issue.

Barugon avatar Dec 25 '21 22:12 Barugon

Hello, there is a bug in the tutorial, to fix that please swap the arguments of lines 125 and 126 (so y will become z and vice versa) (https://github.com/rg3dengine/rg3d-tutorials/blob/main/tutorial2-weapons/src/main.rs#L125). I'll fix that when I'll get back to the book.

mrDIMAS avatar Dec 31 '21 15:12 mrDIMAS

I tried changing it to this...

      .with_y_velocity_range(-0.01..0.01)
      .with_z_velocity_range(0.017..0.02)

...but it still appears behind targets. It looks like the position returned is for the opposite side of the collider.

Barugon avatar Dec 31 '21 18:12 Barugon