Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.
Error while parsing file room.tscnimmense-swallowWhat does that mean?10Dec. 03, 2024
Using a controller iguessfiveI'm trying to add controller for input when moving the sprite but I am finding it difficult to solve the following bug. When moving to any cardinal directions the sprite will face a corresponding ordinal direction. I think the issue is that the inputs near zero are not registering as zero but - or + 1.
I tried implementing is_zero_approx() like this but did not work.
```gdscript
direction.x = 0 if is_zero_approx(direction.x) else direction.x
direction.y = 0 if is_zero_approx(direction.y) else direction.y
```
How would I go about solving this?80Nov. 14, 2024
Lesson Q&A
Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.