Uhh, my Ball can't get to the Goal

The title says already the problem, so i dont have to explain it.

My Url of the Code:
https://www.code3dgames.com/3de/#B/tVjdUts4FL7vTN9B5SZOmzhOWrqdUjpDgUJnKWUIbfduR9hKrMW2vJJMGhjedh9jL/YcyZblJNBysbTjyNL5+c7R+ZH87lIky/fvRubn6ZN3Kpa81ETJeHdrpFPJWPiX2gICu7BGUqZLxR8mUbGQ7FJQmdxDByNCRiNyhrJiRRTTmhdzhdNm7i8VWkoV0jwXZJf0RjgAeb2dTVQLIa+YNHSlXfrTTtUctcKLlJEtFbOCbRGuyCJlkhGlq9mM8IKISpI5zRlZ8CwjKS1LVrxFzmsqieECBQVbOO1TnAv6BpFZD8GSI0mvuV4GSHhxfH54GH5jsRbyZUCiARmOI3hGpG+5UPIsoxoE3+LvNKUJeOIt0bJid44k4/NU18qtzL38krNCn+BC0FukXLMeyA3f+GhokgSGtb/ighislLT2AWhXjCmi09oXzmaqSoB+TjXHLVjwIhGLkBcFk995olMy6swdM1TlMFsdHdBnTBqJ/Jrtm9Xgt+2Br2VAxvA/gj9rhpURlkJxWC3CGxC3HUUb15awNumuZUJc7ekNOxEN4F9/1VWWa9VXkhUJhIncIomki9ph6KvaQOM7UWhhHRhDBrVR0zB33PCdXR6dnNcrwS0tNKcZp6redQur4cSQmvIbFqy5f7DB+5Y3EXGVQ3SEmOShieNkP+VZEjipicgPM4ZEnr3P6z8yvdg7vyD7Xw4+nR6RL6eA+5CcHv5xQU4+nR46sqdPZlURo/PJCYURZFPQJ7coTKccUreYZ5gydk/MVCkWxhneFHrV5NAd4mgEhaUUWuhlyQwBsDS6rAp0bsIls+p977Z7jMFkAgmJmzi5j9Ym5mTbMWSsmEOM72I8wpS1SEqx6OYhzhyzrATbjesbTAN8a5SaFyvQDHtLlmVi0cMx6mtjsFVjXLJzj0+uDfA1r2DY6EoWG0zERUI+U52GihdBu0H9gbcUC7VhKWpw3osnF9fshM10B9F6JHgvQ6vw7BNUkXHkxYMxHqP+oHGlRWRNDv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GanMTqaQlyfIiZ4hRq7GxRSTLoUrwxB5N059wqOhzySC4OOF+YajZ9hkMChppasQYwXnb8rprRlB4qPEliCmqzJQHfdtYPAJMGAtBd9SAB8OOktrvOqIKX9PtUBgsimmpUtkvrLD8+h4evmc5CR8bVM0LRaDHkdGecrgh8NYgHBpvCjAdXOeEVULoROa8E2+UWlg0ar/Toyeh154FtEdS676/967bpiS8w4qFwKPPI7Wx7AWyc8vPmAIbOz0x6XEixcZiHEl9pYLFt2DY7l5k6Mt8Fe31UMd0N0/llnMRe3VR4z+QATAvV56otXex582BtV2fria7nJEyDL98P9Xvg5NjtooOFWuW+j/wE=

But my Output says nothing

The ball is not being launched with enough speed, so have a look at the speed in the launch() method to see if you can spot a problem:

  var speedVector = new THREE.Vector3(
    2.5 * this.power * this.vector().x,
    2.5 * this.power * this.vector().x,
    -80
  );
  ball.setLinearVelocity(speedVector);

I think if you look closely you’ll spot the problem, but if not, let me know and I’ll point it out.

-Chris

I found it, on the 3 Line of this Code is X instead of Y.

1 Like