Hey guys, what did I wrong in this script?
PlayerMovement.attributes.add('turnSpeed', {type: 'number'});`
//rotation
if(this.app.keyboard.isPressed(pc.KEY_Q))
(
this.entity.rigidbody.applyTorque(0,this.turnSpeed,0)
)
if(this.app.keyboard.isPressed(pc.KEY_E))
(
this.entity.rigidbody.applyTorque(0,-this.turnSpeed,0)
)
I need the character to turn around, but it doesn’t work.