Hiya.
when rotating or climbing/diving there's a bit of momentum so that you dont just stop dead when you take your finger off the control. not a lot, but a bit.
can that same type of momentum be applied to forward motion? maybe a bit more than that on the rotation, but not too much. i'm thinking 1 or 2 seconds of 'slide'.
or is that monumentally difficult?
I've thought it before on numerous occasions, so apologies if i asked the question before & forgot!
momentum
Moderators: winston, another_commander
Momentum in Oolite already applies to all movement, and I believe it follows the same principles for any and all movement types.
Not quite sure why we'd need to change it in order to make momentum 'stronger' only for a specific direction of movement....
Not quite sure why we'd need to change it in order to make momentum 'stronger' only for a specific direction of movement....
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
because after turning engines off i could imagine you'd drift forwards a bit, like a boat, maybe. more momentum with the whole ship moving forwards than rotational momentum, which incidentally is spot on imo.
a bit of skidding type movement, so when you turn, you continue a touch in the same vector. a bit like the old asteroids game.
obviously not worth fussing over if it's a pain, as it's for minimal gain, but it's the rotational momentum that makes me think that the basics might already be there in the code. if it's just a case of changing a few numbers, then maybe someone could direct me?
you'd also be quite justified in telling me to get a grip, & stop being so fussy.
cheers.
a bit of skidding type movement, so when you turn, you continue a touch in the same vector. a bit like the old asteroids game.
obviously not worth fussing over if it's a pain, as it's for minimal gain, but it's the rotational momentum that makes me think that the basics might already be there in the code. if it's just a case of changing a few numbers, then maybe someone could direct me?
you'd also be quite justified in telling me to get a grip, & stop being so fussy.
cheers.
Obsessive? You fit right in!
I'm slightly computerless at the moment (netbooks, bah! ), but it might well be something you can have a look at. If I remember correctly, the relevant code should be inside src/core/entities/playerentitycontrols ... Hope this helps!
I'm slightly computerless at the moment (netbooks, bah! ), but it might well be something you can have a look at. If I remember correctly, the relevant code should be inside src/core/entities/playerentitycontrols ... Hope this helps!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Momentum is already in the code. Its called thrust. When you accelerate or decelerate, the speed change is dictated by thrust. Oolite is just cheating a bit by multiplying the player thrust by 4, making it accelerate much faster than an identical defined npc ship. (deceleration is even 32 times faster than an identical npc ship). Its deliberately and I assume its to enhance gameplay for the player.Yodeebe wrote:obviously not worth fussing over if it's a pain, as it's for minimal gain, but it's the rotational momentum that makes me think that the basics might already be there in the code. if it's just a case of changing a few numbers, then maybe someone could direct me?
However I think you are confusing things. Newtonian inertia dictates that any body tries to persist in its movement when you don't apply a force on it. So, when you stop any thruster that makes you turning, a spaceship will persist in its rotation. When you stop your aft thruster the ship will just persist in its forward movement but any acceleration or deceleration shoud stop instantly.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Which is exactly what they do.Switeck wrote:If Oolite's ships are moving because of space frame-dragging, then once the engines shut down they should almost immediately come to a complete stop.
The engines shut down gradually. As soon as there is no engine activity anymore the ship is at a standstill.