Error Msg: TypeError: this.velocity.magSq is not a function

Error msg in code: ball.bouneOff(left);
getting error msg of TypeError: this.velocity.magSq is not a function

This is not a function. It is a collision between two sprites.

Hello @sjohns,

Can you share a link for us to look at? If so, we are happy to take a look.

Often times, the error message indicates a line of code, but the error can be elsewhere in the code.

Also, in your example above, you have misspelled bounce … could that be the issue?

Thanks,

Mike

@sjohns,

Here is a similar post where the same error was discovered and debugged. Perhaps this could help?

Mike