Added Input controls

main
Benjamin Kraft 2 years ago
parent 322aa8baa2
commit b5e5b476bb
  1. 9
      Config/DefaultInput.ini
  2. BIN
      Content/BP_Gamemode.uasset
  3. BIN
      Content/Blueprints/BP_Puma.uasset
  4. BIN
      Content/Blueprints/BP_Robot.uasset
  5. BIN
      Content/Blueprints/BP_Target.uasset
  6. BIN
      Content/Levels/Main.umap
  7. 7
      Source/PBDRobotics/Robot.cpp
  8. 3
      Source/PBDRobotics/Robot.h

@ -78,6 +78,15 @@ DefaultViewportMouseLockMode=LockOnCapture
FOVScale=0.011110 FOVScale=0.011110
DoubleClickTime=0.200000 DoubleClickTime=0.200000
+ActionMappings=(ActionName="ToggleGravity",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=G) +ActionMappings=(ActionName="ToggleGravity",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=G)
+ActionMappings=(ActionName="ToggleController",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=C)
+ActionMappings=(ActionName="ToggleShowTarget",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=V)
+ActionMappings=(ActionName="ToggleFollowTarget",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=F)
+AxisMappings=(AxisName="MoveHorizontal",Scale=-1.000000,Key=A)
+AxisMappings=(AxisName="MoveHorizontal",Scale=1.000000,Key=D)
+AxisMappings=(AxisName="MoveVertical",Scale=1.000000,Key=Q)
+AxisMappings=(AxisName="MoveVertical",Scale=-1.000000,Key=E)
+AxisMappings=(AxisName="MoveDepth",Scale=1.000000,Key=W)
+AxisMappings=(AxisName="MoveDepth",Scale=-1.000000,Key=S)
DefaultPlayerInputClass=/Script/Engine.PlayerInput DefaultPlayerInputClass=/Script/Engine.PlayerInput
DefaultInputComponentClass=/Script/Engine.InputComponent DefaultInputComponentClass=/Script/Engine.InputComponent
DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -62,3 +62,10 @@ void ARobot::Tick(const float DeltaTime){
for (auto* Link : Links) for (auto* Link : Links)
Link->UpdateInternalTransform(); Link->UpdateInternalTransform();
} }
ULink* ARobot::GetEffector() const{
for (auto* Link : Links)
if (Link->IsEffector)
return Link;
return nullptr;
}

@ -32,6 +32,9 @@ protected:
UPROPERTY(BlueprintReadWrite) UPROPERTY(BlueprintReadWrite)
FVector EffectorMove = FVector::ZeroVector; FVector EffectorMove = FVector::ZeroVector;
UFUNCTION(BlueprintCallable)
ULink* GetEffector() const;
private: private:
// Assumes First Link to have Identity Orientation and Joints Array to be in order // Assumes First Link to have Identity Orientation and Joints Array to be in order
void ResetPositionAndOrientation(); void ResetPositionAndOrientation();

Loading…
Cancel
Save