Skip to content

Commit c929d06

Browse files
committed
Fix Look At Direction not recognized as direction mode
Fixes #56
1 parent 08d72f8 commit c929d06

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/WarningDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function validate() {
3232
errors.push({text: `The effect attempts to use opacity but the material is not set to 'Blend'`})
3333
}
3434
35-
if (Config.particle_appearance_facing_camera_mode.substr(0, 9) == 'direction' && Config.particle_appearance_direction_mode == 'derive_from_velocity') {
35+
if (Config.particle_appearance_facing_camera_mode.includes('direction') && Config.particle_appearance_direction_mode == 'derive_from_velocity') {
3636
if (Config.particle_motion_mode == 'dynamic' && !(Config.particle_motion_linear_speed && parseFloat(Config.particle_motion_linear_speed) != 0)) {
3737
errors.push({text: `The particles are set to face a direction, but no speed is set. Only particles with an initial speed support directions`})
3838

src/export.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,13 @@ function generateFile() {
303303
comps['minecraft:particle_kill_plane'] = getValue('particle_lifetime_kill_plane');
304304

305305
//Texture
306+
let facing_camera_mode = getValue('particle_appearance_facing_camera_mode');
306307
var tex_comp = comps['minecraft:particle_appearance_billboard'] = {
307308
size: getValue('particle_appearance_size'),
308-
facing_camera_mode: getValue('particle_appearance_facing_camera_mode'),
309+
facing_camera_mode: facing_camera_mode,
309310

310311
}
311-
if (getValue('particle_appearance_facing_camera_mode').substr(0, 9) == 'direction' &&
312+
if ((facing_camera_mode.substring(0, 9) == 'direction' || facing_camera_mode == 'lookat_direction') &&
312313
(getValue('particle_appearance_speed_threshold') != 0.01 || getValue('particle_appearance_direction_mode') != 'derive_from_velocity')
313314
) {
314315
tex_comp.direction = {

0 commit comments

Comments
 (0)