-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong y coord reported from Lua scripts #4
Comments
Hi! |
Sure, I've attached a super simple repro setup. This was made in Godot 3.4. You can just play the scene and look at the output. Notice that the Lua output is always (x, 0) whereas the GD output is (x, y) as expected. |
Hmm this is very strange indeed. I'm on 64 bit Linux Mint. I even tried building the plugin from source, and the issue is still there. Since I pulled the repo down for testing anyway, I'll try digging in a bit and see if I can figure it out. No errors btw, that's part of the oddness of it. |
So out of curiosity I tried running it in an older version of Godot (3.3.4) and I don't see the problem there. |
Ok, I found how to reproduce. |
Running the Mono enabled Windows editor through wine doesn't show the problem =S |
Ok, I found it! Here's the tale:
Another interesting thing is that Vector3 also had this problem, probably more math types did, if not all of them. Thanks for reporting this, I'll push a fix soon! |
@bojjenclon Should be working now =) |
Woah, awesome debugging! Thanks for the breakdown, I've never really tinkered with this side of Godot so its actually really cool to get a better understanding of the flow here. Super weird about the type mismatch, but glad you managed to figure it out. I'll give it a try ASAP and report back to you :) |
@gilzoide Just tested it and it works! Great job fixing the issue |
The GDNative API is quite straightforward, although low-level, but it follows the same semantics as GDScript.
Yeah =/
Thanks for the double-check! I want to have unit tests someday, they could be run in the several oficial Godot binaries and things like this bug would be caught earlier. |
I'm having a weird issue where
self.position
from a KinematicBody2D is always giving a y-coord of 0. I tested the exact same setup with GDscript and the position was reported as expected, so its definitely something on the Lua side.The text was updated successfully, but these errors were encountered: