Closed SharktasticA closed 6 years ago
Self-note (links to helpful websites):
-Mouse controlled, W/S for throttle > http://answers.unity3d.com/questions/1153096/3d-space-movement-character-stuck-at-edge-in-free.html -Object rotation towards cursor position > http://wiki.unity3d.com/index.php?title=LookAtMouse -ScreenPointToRay > https://forum.unity.com/threads/navigation-movement-in-3d-space.383663/ -Simple/Placeholder movement > http://answers.unity3d.com/questions/806120/spaceship-movement-and-momentum.html http://answers.unity3d.com/questions/707783/space-movement-script.html http://answers.unity3d.com/questions/404856/moving-an-object-in-3d-space-complexity.html http://answers.unity3d.com/questions/175325/realisticno-gravity-spaceship-movement.html
Awesome sauce! I'll take a look at integrating it for testing on my gravity model soon.
Will make minor changes to the movement script before moving on to the creation of firing system.
It turns out our ship is just way too difficult/unfriendly for the player to control with current movement scripts so I'll have to redo them from the ground (although I did learn a lot making the not-so-good-ones). I will however be consecutively working on both the firing and the movement system, focusing more on the movement system. I apologize to everyone for this unexpected delay in my implementations.
No no, it's fine. We should remember that we are learning the system. We're still making good progress.
Instead of scraping the whole system, I decided to use the current system but make it more user-friendly and easier to manipulate. The idea is that the torque it was applying when the user held either A or D keys will be applied automatically. When the user moves the cursor to the far left/right, the torque will gradually apply, depending on how close the cursor is to (0, y) or (screenWidth, y). This is just a concept and I didn't have much time to implement or test it due to course workload but as this isn't a huge change to address, I predict it will be some time this/next week. What's also good is that the system is using forces instead of manipulating transforms which will make it easier when implementing movement gravity. I am still not sure how the cameras and the body itself will react to that, as previous gravity scripts weren't compliant with movement scripts but I think we won't have any problems as long as the calculations and physics are kept simple.
The new simplified, smoother and easily modifiable movement model is incorporated in the project below, with 4 scripts - 2 for camera and ship rotation, 2 for camera and ship movement:
It's currently uploaded in this format as I need a stable master scene to pull from where I could test it and then merge it.
Note to self: make super speed variable global so it can be changed without editing scripts every time.
Because of the new variable system, I'm gonna have to make slight modifications to the camera and movement scripts to take advantage of them. I'll comment the changes (which are relatively minor) and commit them to master by the end of the day.
Update 4bf044ae5ae3dbcc34f658abc99f3a81eb8638ec: Changed how the camera follows the player due to the previous offset system being inefficient and not working correctly when the probe is facing opposite to its starting direction.
In order to test out creating and modifying orbits in our gravity model, we will require three-dimension movement to allow us to make small movements to refine our gravity model for later implementation when we start making the complete game.
This issue was decided voluntarily, but is ideally needed within a week or two.