Setting the velocity of a cube in a script?
Quote from Pesky Little Bird on May 17, 2021, 1:09 pmIs 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.)
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.)