简体   繁体   中英

Libgdx Bullet getRayFromWorld() broken

Okay, so I am not sure what point I updated from, but I grabbed the newest nightly tried to recompile my code to find

callback.getRayFromWorld().setValue(rayFrom.x, rayFrom.y, rayFrom.z);
callback.getRayToWorld().setValue(rayTo.x, rayTo.y, rayTo.z);

was broken, so I tried

callback.getRayFromWorld(rayFrom);
callback.getRayToWorld(rayTo);

to no avail. checking the libgdx github I couldn't understand what had changed. Any ideas?

getRayFromWorld will set the specified vector to the rayFrom (it will get the vector). You'll want to use setRayFromWorld instead:

callback.setRayFromWorld(rayFrom);
callback.setRayToWorld(rayTo);

For more info on this change, see: https://github.com/libgdx/libgdx/pull/2176#issuecomment-50459926

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM