How to implement gun scope which is movable on scene touch event

Hello @kadamdeepak84
I though about this and if it’s okey for you to scope stay’s in middle of screen all time, you might wanna think about on moving the “camera” itself.

camera.scrollX += someValue;
camera.scrollY += someValue;

while listening
this.input.on('pointermove', function(pointer){ if(pointer.isDown) { //camera move's here } }, this)

update: also check on how to colliders from moving with camera maybe

1 Like