[SOLVED] Need a mobile tester for my app


#1

If someone here can be active and test this app please let me know my phone wont run it (IOS 6) and Im not sure if this will work the app is an FPS shooter and im putting in mobile controls for fun right now its just aiming but i need to know if it works

I will soon be adding buttons that you can click with mobile but for now if you touch the screen the gun should aim if not please let me know here is the link to game.

https://launch.playcanvas.com/750123?debug=true


#2

You can set Chrome Developer tools to use mobile view to get you most of the way there. https://developers.google.com/web/tools/chrome-devtools/device-mode/


#3

Thanks so much i havent really moved in the mobile direction but i realized i was that one mobile gamer that always wanted a decent game on mobile


#4

But what i wanted to atomically test was whether or not the screen is being ‘touched’


#5

You can do that with the Chrome dev tools. It emulates touch events.


#6

Ok thx! i will work on that today


#7

@yaustar ok so i have a problem with making my gun shoot again i used this playhack to kinda help out.
here is how i basically converted it:

var Bullet = pc.createScript('bullet');

// initialize code called once per entity
Bullet.prototype.initialize = function() {
    this.app.mouse.on (pc.EVENT_MOUSEDOWN, this.onMouseDown, this);
    this.app.mouse.on (pc.EVENT_MOUSEUP, this.onMouseUp, this);
    
    this.bullet = this.app.root.findByName('bullet');
    this.other = this.app.root.findByName('Other');
    
};

// update code called every frame
Bullet.prototype.update = function(dt) {
    
};

Bullet.prototype.onMouseDown = function(event) {
      if(event.button === pc.MOUSEBUTTON_LEFT) {
        this.shoot();
    }  
};

Bullet.prototype.shoot = function() {
    var force = this.force;
  var bullet = this.bullet.clone();
    this.app.root.addChild(bullet);
    this.bullet.setPosition(this.other.getPosition());
    this.bullet.enabled = true;
     this.force = new pc.Vec3();
    this.force.copy(this.bullet.forward);
    this.force.scale(-this.impulse);
    
    this.entity.rigidbody.applyImpulse(force);
};

But its calling applyImpulse undefined can you tell me why is that so? i looked at so many ways this could be wrong for but cant find anything


#8

Does the this.entity have a rigidbody? Is physics enabled?


#9

Yes the physics are enabled does it have something to do with the gravity?


#10

Ok @yaustar i fixxed one error to recieve another which is this:
19%20AM
Im not sure what this means i havent seen this before…

EDIT:
Here is a link to the project if you need it:

https://playcanvas.com/project/615363/overview/multiplayer-fps-test


#11

Nevermind @yaustar I fixxed it the bullets are working i used some code from one of my other projects (‘Amatuer Game’) to build the bullet but it wasnt my main goal as i want the player to be able to see the bullet move like in shellshock.io


#12

It doesn’t look like the bullets move to me in that game. It’s all just impact effects on the wall/etc.


#13

Are you talking about shellshock.io ? or are you talking about my app? in shellshockers if you shoot your weapon you can see your shot/projectile move across the area you shot from. I want mine to do the same thing but with a higher speed. also how would i make more of a username base above the player as well? with their Playcanvas name Google username etc?
EDIT:
Also @yaustar there is a slight problem with the death of the players… I seem to have everything in place but the ‘other’ entity will not die on contact


#14

Talking about shellshock. I can’t see the projectiles when I fire them (at least not easily). If you want to do PUBG style bullets, then you can use the method here: [SOLVED] Delay for the shot


#15

Thanks @yaustar but before i can even do anything in the game this happens:
https://playcanvas.com/editor/scene/750123
Try it yourself tell me what you think (Bullet will not stay that way.)