# Can new servo motion solve this?

I’ve been testing out the new servo motion actuator, and I got to wondering…

Can it solve the age-old problem of linearVelocity messing up gravity?

I’ve read through Ben2610’s explaination and have a fair understanding of what each setting does. However, I have not yet been successful at getting linearVelocity to work without turning gravity off. Maybe I’m not thinking about the servo settings properly.

You don’t use linV in servo, that’s part of the force actuator, not servo.

I’ve noticed that you need to click on all of the axis (X,Y, and Z) and put the ones your not using at a very small value (.1 or so) to do it. It seems to work pretty well, I use it in my game here if you want to take a look.

Where it says linV in the servo motion actuator, it is only refering to forces to apply to the object based on the limits? Would I need to add a 2nd motion actuator that applied regular linV in addition to the servo limits actuator?

Oooh, I’m sorry, I thought you meant the linV of the normal force actuator.

The “linV” value in the servo actuator is just the velocity that you want your object to be moving at. It’s not related to the “other” linV of the old force actuator (which has the gravity problems). Have you tried using the servo motion actuator and playing around with it?

When I want linear velocity to work, I think I have a solution. Say I want to influence the x value…
x += whatever;
z = object.getLinearVelocity()[2];

Basically, I set the z-position of the object (up and down) to be the value that it is currently; this way, when the object drops, it sets the linear velocity (downward) to be that, duplicating effectively gravity.

This works when ‘p’ is first pushed and the GE starts. But once the object lands, and I have it move off an edge, it floats down slowly.

The attached blend demonstrates what I’m talking about. Once the object lands, it floats slowly from then on.

However, I did notice that by activating “True level triggering (pulse mode)” it makes gravity behave correctly. So I guess your solution does work Joeman16!! Bravo!!! Except…

The character object in my project will not animate while pulse mode is on. The only solution I see now is to set up a different set of identical keyboard sensors for animations than for physics/movement.

I tried setting up the typical WASD movement controls with pulse mode “on” tied to the object used to detect physics. And a separate set of WASD movement controls with pulse mode “off” tied to the object that animates while moving. This seems to work like a CHARM!!!

GRAVITY AND LINV WORKING IN PEACE AND HARMONY!!!

AGAIN THANKS JOEMAN16!!!

### Attachments

zGetLinV.blend (129 KB)

Why not just set a collider?

collision with ground____AND____linV
keyboard command____/