mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 16:52:43 +08:00
fix trail render error (#6046)
This commit is contained in:
@@ -32,7 +32,8 @@ const _temp_vec3_1 = new Vec3();
|
||||
const _temp_color = new Color();
|
||||
|
||||
const barycentric = [1, 0, 0, 0, 1, 0, 0, 0, 1]; // <wireframe debug>
|
||||
const _bcIdx = 0;
|
||||
// tslint:disable-next-line: prefer-const
|
||||
let _bcIdx = 0;
|
||||
|
||||
interface ITrailElement {
|
||||
position: Vec3;
|
||||
@@ -404,7 +405,7 @@ export default class TrailModule {
|
||||
|
||||
public _updateMaterial () {
|
||||
if (this._particleSystem && this._trailModel) {
|
||||
const mat = this._particleSystem.renderer.trailMaterial;
|
||||
const mat = this._particleSystem.getMaterialInstance(1);
|
||||
if (mat) {
|
||||
this._trailModel.setSubModelMaterial(0, mat);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user