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
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.
Here are the correct files.
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
Your email address will not be published. Required fields are marked *
Save my name, email, and site URL in my browser for next time I post a comment.
I want to thank the author for this course! It’s very useful. Please, keep doing it!
Thank you very much! More to come…
Is it possible to add user text-input in the game? Then, some people and I would be willing to join the course.
I found lots of people asked this question.
I saw some plug-ins, which is too hard for me to follow.
Yes, you can add text input to any phaser 3 games.
What do you want to use it for?
I have a youtube video on this coming out later this week.
Comments are closed