https://playcanvas.com/editor/scene/1990222
Im a beginner trying to learn playcanvas, can anyone tell me why this is happening.
here’s my movement code
ar Movement = pc.createScript('movement');
// initialize code called once per entity
Movement.prototype.initialize = function() {
}
// update code called every frame
Movement.prototype.update = function(dt) {
if (this.app.keyboard.isPressed(pc.KEY_UP)){
this.entity.rigidbody.applyForce(1000,0,0);
}
};
Both of the objects have rigid body and collision. idk what I’m doing wrong