I'm at the beginning stages, and have a lot to do, hence the (lame) request, as it's holding me up, I figured I can find someone who has dealt with it before, so I'm not re creating the wheel (some more).:)
If you're in mouse flight mode, either via toggle or holding down the button,
Get the x/y coordinates of the mouse relative to the center of the screen
Get the maximum distance from center of the mouse in each axis (screen size)
Calculate the ratio between the current mouse deflection and maximum
Calculate the target angular velocity for each axis by multiplying that ratio by the ship's maximum angular velocity in that axis
(prototype: set the angular velocity of the ship in the corresponding axis to that value)
(final: set the target angular velocity of the ship to that value, then increase or decrease the ship's current angular velocity by whatever the angular acceleration is)
take a look of my little project. it has scpritable system loader like FL has through ini files, supports shiparch.ini analog and has custom atmosphere shader. currently me and some other guys, we are writing project documentation.
First instead of offering to help you tell the man his problem is lame, and then you attempt to hijack the thread with your own project to stroke your own ego. You my friend, are a true saint. I hope life treats you as well as you treat those around you.
' Wrote:First instead of offering to help you tell the man his problem is lame, and then you attempt to hijack the thread with your own project to stroke your own ego. You my friend, are a true saint. I hope life treats you as well as you treat those around you.
whatever bro, but Im not sure why ask on disco forum about problem that is actually can be found on the first google request. I just wonder
Thanks I'll give this a try, it's pretty basic and easy to convert down to C# code, thanks!
' Wrote:Uhm...
If you're in mouse flight mode, either via toggle or holding down the button,
Get the x/y coordinates of the mouse relative to the center of the screen
Get the maximum distance from center of the mouse in each axis (screen size)
Calculate the ratio between the current mouse deflection and maximum
Calculate the target angular velocity for each axis by multiplying that ratio by the ship's maximum angular velocity in that axis
(prototype: set the angular velocity of the ship in the corresponding axis to that value)
(final: set the target angular velocity of the ship to that value, then increase or decrease the ship's current angular velocity by whatever the angular acceleration is)