You need to log in to create posts and topics.

Setting the velocity of a cube in a script?

Is there a stable / consistent way to set the velocity of a physics object? For what I'd like to do, it'd need to work wherever the cube is (air, ground, right next to you, etc.).

SetVelocity works for the player, but not for cubes - the vector is set correctly (confirmed via a DebugDrawLine in the new direction), but the cube doesn't move. Presumably this is because it's the QPhysics shadow, not the VPhysics object actually controlling the object's movement?

(New to Portal 2 scripting, so apologies if this is a stupid question.)