I don’t have a box around the bird but my template also seems to be a bit different than what you are showing in the vid. Some of it looks the same but I did not have the commented out physics portion in mine. Is there a newer version of your template?
I also noticed in the previous video, the code you have to copy isn’t quite the same as what you did in the video?
One thing I did notice is when I hover over the “this.bird = this.placeImage” it shows the method but it does not show the “physics?” part of the method, it ends at “scale: any”
When I then go to baseScene.js, it only shows “placeImage(key, pos, scale)”
Could that be why there is an issue?
Yes, that would certainly mess things up. As soon as I saw your post I realized that I had uploaded from the laptop which had older files on it.
*facepalm*
Here are the correct files.
why on the step set up physics my code error.. Uncaught TypeError: Cannot read property ‘setGravityY’ of null.. this.bird.body =null
First, make sure you have physics enabled. Is there a box around the bird?
I get the same error as gmich_.
I don’t have a box around the bird but my template also seems to be a bit different than what you are showing in the vid. Some of it looks the same but I did not have the commented out physics portion in mine. Is there a newer version of your template?
I also noticed in the previous video, the code you have to copy isn’t quite the same as what you did in the video?
It is possible there is a version I neglected to upload. I’ll just upload the latest now to but sure.
What code do you mean?
I’ve updated it to version 3.1.3
This should work for anything in the videos
https://phasergames.com/downloads/ultimate-game-parts-template-for-phaser-3-2/
Sorry for any frustration this may have caused.
Hmmm, sadly I still get the same error.
One thing I did notice is when I hover over the “this.bird = this.placeImage” it shows the method but it does not show the “physics?” part of the method, it ends at “scale: any”
When I then go to baseScene.js, it only shows “placeImage(key, pos, scale)”
Could that be why there is an issue?
Yes, that would certainly mess things up. As soon as I saw your post I realized that I had uploaded from the laptop which had older files on it.
*facepalm*
Here are the correct files.
https://phasergames.com/wp-content/uploads/edd/2020/06/UT3.zip
BOOM, we have liftoff…errr… I mean…we have a, dropping through gravity, bird!!!
Thanks so much for taking the time to help get this sorted. I look forward to finishing this course tomorrow
No problem!