[SOLVED] I want an object to "open and close" But when I go near it, it moves forwards

I’ve tried looking at it but I think it is because I haven’t added a screen.

@Kyle_3_1415 I see you may have reused some scripts from T2Space. Having some issues getting a clean run of your code.

Could you describe a little more about what the issue is other than the one above? Also I think if you remove the audio.js it may work better.

I think you will have to change the tween vector here.

this.tween = this.entity.tween(locPos).to({x: this.endPoint, y: 0, z: 0}, this.duration, pc.Linear);

Currently it is setup to tween on the x. You could change the script to tween z. I have not forked the project so I am making just some assumptions.

1 Like

@Kyle_3_1415 I tried to run your code and I see you have corrected the audio issue. The next issue is if you look in your script folder I see numerous copies of the same .js modules.

1 Like

Thank you, The program works much better. :wink: