I'm not sure what you're doing wrong exactly. For starters, you shouldn't put your forge code directly in the input update function.
Second, you need to filter what sorts of objects you can select. Projectiles should NOT be in this filter. Back when we had the gravity gun I once held on to a rocket I shot, then let it go. When it collided, the game would crash.
Third, whenever you move a object you need to disconnect it from the bsp, then when you're finished you have to reconnect it. The next release will have the required functions needed perform said operations. Internally, the object-set-position function that is also declared in EngineFunctions calls the bsp connection code, so if you were using the engine function you wouldn't have to worry about it. However, you're directly modifying the object's world data so you wouldn't be calling the object-set-position and thus would have to explicitly call the connection code.
I don't think we used any of the mouse buttons for the gravity gun (Internally is was referred to as the ObjectInterface, but kept the name used in gary's mod so users would get the idea) except for Button3 plus the scroller if it has one. For selection toggling we used a key binding.
Bookmarks