-
Notifications
You must be signed in to change notification settings - Fork 211
Fixing bug of fn rotated in Vector3 #760
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
Conversation
|
Thanks! This seems to be a bug in Indeed they do, if I run the following in GDScript: var axis = Vector3.UP
var v = Vector3(37.51756, 20.39467, 49.96816)
var phi = -0.4927880786382844
var basis = Basis(axis, phi)
print("v.rotated(axis, phi) = ", v.rotated(axis, phi))
print("basis * v = ", basis * v)
print("basis.xform(v) = ", basis.xform(v))Output: Could you fix |
|
@jo32 let me know what you prefer: either fix |
|
@Bromeon Thank you for your insights! Sorry for the late response and I am currently working on another urgent project for job so I have little time to continue this fix right now. I have added you to the fork repo and it would be so kind if you can help with it. |
|
bors r+ |
760: Fixing bug of fn rotated in Vector3 r=Bromeon a=jo32 based on related code in godot: https://github.com/godotengine/godot/blob/554c776e08c9ee35fa9e2677e02f4005c11ddbc0/core/math/vector3.cpp#L36 Co-authored-by: Jan Haller <[email protected]>
|
Build failed: |
Fixes also Vector3::rotated(). Add unit test. Co-authored-by: jo32 <[email protected]>
|
Rebased on latest master. |
760: Fixing bug of fn rotated in Vector3 r=Bromeon a=jo32 based on related code in godot: https://github.com/godotengine/godot/blob/554c776e08c9ee35fa9e2677e02f4005c11ddbc0/core/math/vector3.cpp#L36 Co-authored-by: Jan Haller <[email protected]>
|
Build failed: |
The following warning (as error) was generated:
-------------------------------------------------------
error: constructor `null` has the same name as the type
--> gdnative-core\src\object.rs:1023:5
|
1023 | / pub fn null() -> Self {
1024 | | Null(PhantomData)
1025 | | }
| |_____^
|
= note: `-D clippy::self-named-constructors` implied by `-D clippy::style`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_named_constructors
-------------------------------------------------------
|
Updated to Clippy lints from stable toolchain 1.55 |
|
Build succeeded: |
|
Thanks for the help @jo32! I mentioned you as co-author in the commit. |
based on related code in godot: https://github.com/godotengine/godot/blob/554c776e08c9ee35fa9e2677e02f4005c11ddbc0/core/math/vector3.cpp#L36