zee_best 3 Posted October 18, 2017 Is there a way to disable the client moving the camera around during the interact method of GameObject? Every time it interacts with the object it randomly moves the camera and I don't want that. I'm assuming this was added to the client in order to try and randomise mouse movements more but it's not needed if interacting with a stationary object 5 times in a row and it keeps swinging the screen randomly.
Nuclear Nezz 2105 Posted October 18, 2017 It should only rotate camera if it's off screen. But you can make your own interaction event GameObject go = getGameObjects().closest(stuff);EntityDestination ed = new EntityDestination(getClient(), go);InteractionEvent ie = new InteractionEvent(ed);ie.interact(action, InteractionSetting.EMPTY); or something like that, tbh been a while since I've looked at it.
Genius 50 Posted October 19, 2017 ^What Nezz said. Here's a method I made in a script that manually handled camera movments. Feel free to use it if you'd like boolean customInteract(String action, Entity name) { EntityDestination ed = new EntityDestination(getClient(), name); InteractionEvent ie = new InteractionEvent(ed); if (ie.interact(action, InteractionSetting.MOVE)) return true; return false; } Example usage: customInteract("Chop", tree); //tree is a predefined tree object
Recommended Posts
Archived
This topic is now archived and is closed to further replies.