Proximité : LPDirectControlSubsystem (marche ZQSD/WASD, touche E), DefaultInput, index furniture.lpnear
Phase Proximité (CHG-157, 166, 167). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1e4a1feb18
commit
5e901bef31
3 changed files with 1196 additions and 5 deletions
|
|
@ -123,8 +123,8 @@ DoubleClickTime=0.200000
|
|||
+ActionMappings=(ActionName="SpeedUp",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Equals)
|
||||
+ActionMappings=(ActionName="SpeedDown",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Hyphen)
|
||||
+ActionMappings=(ActionName="Recommended",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=R)
|
||||
+ActionMappings=(ActionName="Journal",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Q)
|
||||
+ActionMappings=(ActionName="Journal",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=J)
|
||||
+ActionMappings=(ActionName="Interact",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=E)
|
||||
+ActionMappings=(ActionName="QuickSave",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=F5)
|
||||
+ActionMappings=(ActionName="Quickload",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=F9)
|
||||
+ActionMappings=(ActionName="Favorite1",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=One)
|
||||
|
|
@ -152,10 +152,12 @@ DoubleClickTime=0.200000
|
|||
+AxisMappings=(AxisName="DownUp",Scale=1.000000,Key=Up)
|
||||
+AxisMappings=(AxisName="DownUp",Scale=-1.000000,Key=Down)
|
||||
+AxisMappings=(AxisName="ScrollDownUp",Scale=1.000000,Key=MouseWheelAxis)
|
||||
+AxisMappings=(AxisName="LeftRight",Scale=1.000000,Key=D)
|
||||
+AxisMappings=(AxisName="LeftRight",Scale=-1.000000,Key=A)
|
||||
+AxisMappings=(AxisName="DownUp",Scale=1.000000,Key=W)
|
||||
+AxisMappings=(AxisName="DownUp",Scale=-1.000000,Key=S)
|
||||
+AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=Z)
|
||||
+AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=W)
|
||||
+AxisMappings=(AxisName="MoveForward",Scale=-1.000000,Key=S)
|
||||
+AxisMappings=(AxisName="MoveRight",Scale=-1.000000,Key=Q)
|
||||
+AxisMappings=(AxisName="MoveRight",Scale=-1.000000,Key=A)
|
||||
+AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=D)
|
||||
+AxisMappings=(AxisName="CursorX",Scale=1.000000,Key=MouseX)
|
||||
+AxisMappings=(AxisName="CursorY",Scale=1.000000,Key=MouseY)
|
||||
+AxisMappings=(AxisName="PenisRotation",Scale=1.000000,Key=PageUp)
|
||||
|
|
|
|||
1112
Source/LifePlay/LPDirectControlSubsystem.cpp
Normal file
1112
Source/LifePlay/LPDirectControlSubsystem.cpp
Normal file
File diff suppressed because it is too large
Load diff
77
Source/LifePlay/LPDirectControlSubsystem.h
Normal file
77
Source/LifePlay/LPDirectControlSubsystem.h
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
// Marche du personnage et invites de proximite.
|
||||
//
|
||||
// LeftRight et DownUp restent la vue de dessus (BPs/PC : LeftRightBirdView, DownUpBirdview).
|
||||
// La marche lit deux axes neufs, MoveForward et MoveRight. Elle ne tourne pas quand un menu
|
||||
// a le clavier (reglages, journal, panneau Clavier, saisie de texte).
|
||||
//
|
||||
// Les invites viennent des textes des modules : WHERE contenant interaction, et les fichiers
|
||||
// .lpnear (MESH, PROMPT, ACTION). La liste est tenue ici, sur la personne ou le maillage le
|
||||
// plus proche, et elle reste cachee. E l'affiche ; un second E, ou un clic, lance l'action.
|
||||
// Le personnage n'est pas possede : la marche active bRunPhysicsWithNoController.
|
||||
// Le cycle walk_F et la camera suiveuse ne sont plus appliques ici : ils cassaient
|
||||
// le corps et la vue. L'essai est la sandbox interaction (LifePlay_interaction_sandbox.bat).
|
||||
// Aucun Blueprint n'est modifie.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Animation/AnimationAsset.h"
|
||||
#include "Camera/CameraActor.h"
|
||||
#include "Containers/Ticker.h"
|
||||
#include "Subsystems/GameInstanceSubsystem.h"
|
||||
#include "LPDirectControlSubsystem.generated.h"
|
||||
|
||||
class AActor;
|
||||
|
||||
UCLASS()
|
||||
class LIFEPLAY_API ULPDirectControlSubsystem : public UGameInstanceSubsystem
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
|
||||
virtual void Deinitialize() override;
|
||||
|
||||
void ActivatePrompt(int32 Index);
|
||||
void HighlightPrompt(int32 Index);
|
||||
|
||||
private:
|
||||
bool Tick(float DeltaTime);
|
||||
void RefreshIndex();
|
||||
void RefreshTarget();
|
||||
void Walk(float DeltaTime);
|
||||
void FollowCamera(APawn* Pawn, APlayerController* PC, float DeltaTime, bool bMoving);
|
||||
void WalkAnim(ACharacter* Character, float Speed);
|
||||
void RestoreAnim();
|
||||
void PollInteract();
|
||||
void ShowPrompts();
|
||||
void HidePrompts();
|
||||
|
||||
FTSTicker::FDelegateHandle TickHandle;
|
||||
float MenuDelay = 0.f;
|
||||
float IndexDelay = 0.f;
|
||||
float TargetDelay = 0.f;
|
||||
bool bMenuBlocks = false;
|
||||
FString LastEnabled;
|
||||
bool bIndexed = false;
|
||||
FString ShownSignature;
|
||||
int32 Selected = 0;
|
||||
bool bPromptOpen = false;
|
||||
TWeakObjectPtr<AActor> CurrentTarget;
|
||||
bool bCurrentIsPerson = false;
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<ACameraActor> FollowView;
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<AActor> BirdView;
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<UClass> SavedAnimClass;
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<UAnimationAsset> SavedSingleAnim;
|
||||
|
||||
uint8 SavedAnimMode = 0;
|
||||
bool bAnimCaptured = false;
|
||||
};
|
||||
Loading…
Reference in a new issue