We now have a working prototype of the Movable Golem mechanic.
The MovablePillar golem class has a forceApplied event that is triggered as long as the pawn is outside the tether length, aka 'stretching.' This sets the direction that the Golem should move. The tick function moves the golem so long as the tether is stretching. Otherwise, it interps to a stop.
event forceApplied(Vector direction)
{
directionVector = direction;
}
event Tick(float DeltaTime)
{
local vector movementVector;
// Inheritance
super.Tick(DeltaTime);
directionVector = VInterpTo(directionVector, vect(0,0,0), DeltaTime, 10);
movementVector = directionVector * DeltaTime;
movementVector.Z = 0.0;
Move(movementVector);
}
Aside from anything that Level and Puzzle designers ask me to change, I have a couple future fixes that I would like to implement. A 'mass' value for the golems, to determine how heavy they are, and how resistant to the pull of the pawn they are, so they don't move at the same speed as the player. Also, I want to experiment with using SmoothMove rather than Move to get a sliding effect. I want to make sure that the golems can be stopped by other assets with collision to limit the distance and places that the movable golems can go.