Hello, i’m struck trying to make the player throw an arrow, at first the character was thrown(but just 1 time), now after some try, the animation seems to work but i don’t see the arrow at all, also after the first time the character don’t move anymore.
here is the project https://playcanvas.com/editor/scene/396696 R key to change weapons 8shooting works against orc and deer).
here is the code
shoot: function (event) {
this.state="attack";
this.model.animation.play("orc club attack.json", this.blendTime);
this.model.animation.speed = 0.5;
this.model.animation.loop = false;
this.arrow=app.root.findByName('Arrow');
var aarrow = this.arrow.clone();
app.root.addChild(aarrow);
aarrow.setPosition(this.entity.getPosition());
aarrow.enabled = true;
this.force.copy(this.entity.forward);
this.force.scale(-this.impulse);
aarrow.rigidbody.applyImpulse(this.force);
},
if anyone want help i can give access to project