Okay I found the problem! It's not about Python, it's about Unity. Instead of # -this all can't work in Aim Hero(unity) Time.sleep(1.5) #'cause this code working slow Pydirectinput.moveTo(900, 600) # estimated center position of screen # But the in-game perspective has never changed.Ĭan you try # -this all can't work in Aim Hero(unity) # The mouse keeps moving and eventually moves out of the game window. # If the command to move the mouse is executed n times, the in-game camera will move n-1 times # If the command to move the mouse is executed once, the in-game camera does not move. Pydirectinput.moveTo(pos.x + 200, pos.y) # can work in borderlands 2 Pydirectinput.moveTo(pos.x + 100, pos.y) # can't work in borderlands 2 # -this all can't work in Aim Hero(unity) # -this can work in borderlands 2 and Aim Hero(unity) Initial suspicion is the difference between Unity games and DirectX games. However, the mouse will move out of the game's window, and the in-game perspective does not move with it. I execute the command to move the mouse, and the mouse actually does move. But the character's perspective doesn't move and shoot. The characters in the game move with my control. I can move forward and backward and turn the camera.īut it can't work in 《Aim Hero》, which is a unity game. Used pydirectinput.keyDown() and pydirectinput.keyUp() to input key. I used pydirectinput.moveTo() to move mouse. There's still lot of things i want to add and polish, so stay tuned for later updates.I want to simulate mouse movement through Python, so that the perspective of the Unity game rotates accordingly. Decided it was time to share it and take some well deserved time away from the computer ! But almost 400 hours later (see details here), it starts to feel a bit more vibrant and alive than the screenshots aboveĪnd now, even though it's not finished and perfect as i'd like it to be, my wrist is calling a stop as i've spent more than 70 hours last month alone, on top of my actual job. There's been a lot of experimenting, reading tutorials, and more experimenting. It is not half an hour drive like the original, but with 17km and not all perfect asphalt, it certainly is challenging to master ! Quickly i really wanted a Test Drive Unlimited feel with a full "around the island", and this is what became the Scenic layout. The feeling of driving on a track of my own creation, built from an empty scene felt surreal. i wish i was more organized and did a proper timelapse progress !īut i remember the first drive was phenomenal. Then flying around a bit more, i passed Union Island and thought that was it.Īnd so on. The shape looks cool, although a bit narrow. First i thought of Canouan island, which is 30km away from Union Island. And how fun it would be to have a "complete" map surrounded by water, something that's never been done (to my knowledge). That's how i got the idea of making one for Assetto Corsa. as i was exploring the globe with Flight Simulator, i flew with a jet from Trinidad & Tobago all the way to Puerto Rico, no gps, just following the flow of islands. Time passed, and one day, out of the blue. since Google map is limited to visit the island. But not being there anymore would prove difficult to get the references etc. I lived 7 years on the island of Cyprus, and really wanted to recreate the feeling i had back there driving the Caterham. Being in control of the whole process of creating a track from scratch, and see how that exercice would work. After helping Phoenix on LA Canyons, and PCH more recently, i always wanted to try and create my own roads.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |