Fix skidmark orientation (#220) (#233)

Don't reset skidmark normal to the horizontal plane, but rather use the
one received from the wheel.

This fixes incorrect rendering of skidmarks on sloped surfaces.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
This commit is contained in:
Artur Rojek 2022-11-06 23:02:09 +01:00 committed by GitHub
parent 8a24f85e7b
commit ff431b7955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -231,9 +231,6 @@ void SkidSection(tCar_spec* pCar, int pWheel_num, br_vector3* pPos, int pMateria
gSkids[skid].actor->render_style = BR_RSTYLE_DEFAULT;
gSkids[skid].actor->material = material;
gSkids[skid].normal = pCar->nor[pWheel_num];
gSkids[skid].normal.v[0] = 0;
gSkids[skid].normal.v[1] = 1;
gSkids[skid].normal.v[2] = 0;
StretchMark(&gSkids[skid], &pCar->prev_skid_pos[pWheel_num], pPos, pCar->total_length[pWheel_num]);
PipeSingleSkidAdjustment(skid, &gSkids[skid].actor->t.t.mat, pMaterial_index);
pCar->old_skid[pWheel_num] = skid;