I have got some things working now, including moving objects in game with OS but of course there are bugs. In the end of the video, I demonstrate moving of objects, click-n-drag style. The problem is some objects don't render when moved in certain positions and based on where you are standing. I think it has to do with the portal it is in, but if anyone knows as to why let me know.
The main problem I am having is with mouse button states. In the following first minute of the video I am holding down left mouse button the entire time, sometimes the gun fires and sometimes it doesn't. It only does when you change your x or y angle about 45 degrees or more. If you are looking straight forward, it doesn't fire which is what I want since I am hijacking the mouse.
I guess a way to solve this would be to just remap the mouse button control settings to unused. This code is inside the Input hooked update function. I check for mouse button state and set it to zero. My question is why are weapons still firing at certain angles even though I set the mouse button states to null?
GetKeyState() with certain keys seems to not be working. It could be my code, but everything seems right. I also noticed the key indexes are custom, they aren't the same as Windows virtual key codes. sad face
Just something cool I figured out since Halo doesn't use SetTransform(), through vertex shaders I can project 3d vectors from object space into 2d screen space for even custom objects. The WorldToScreen I wrote is very buggy. I can't wait to implement this in OS!
Bookmarks