3#include <Foundation/Communication/Message.h>
4#include <JoltPlugin/Actors/JoltDynamicActorComponent.h>
8 class SixDOFConstraint;
51 bool GrabNearbyObject();
54 bool HasObjectGrabbed()
const;
60 float GetGrabbedActorMass()
const {
return m_fGrabbedActorInverseMass > 0.0f ? 1.0f / m_fGrabbedActorInverseMass : 0.0f; }
63 void DropGrabbedObject();
66 void ThrowGrabbedObject(
const plVec3& vRelativeDir);
71 void BreakObjectGrab();
74 float m_fBreakDistance = 0.5f;
78 float m_fSpringStiffness = 50.0f;
81 float m_fSpringDamping = 10.0f;
84 float m_fMaxGrabPointDistance = 2.0f;
88 float m_fCastRadius = 0.0f;
91 plUInt8 m_uiCollisionLayer = 0;
94 float m_fAllowGrabAnyObjectWithSize = 0.75f;
96 void SetAttachToReference(
const char* szReference);
104 void ReleaseGrabbedObject();
115 float m_fGrabbedActorGravity = 1.0f;
116 float m_fGrabbedActorInverseMass = 0.0f;
121 JPH::SixDOFConstraint* m_pConstraint =
nullptr;
124 const char* DummyGetter()
const {
return nullptr; }
Base class of all component types.
Definition Component.h:25
virtual void SerializeComponent(plWorldWriter &inout_stream) const
Override this to save the current state of the component to the given stream.
Definition Component.cpp:54
virtual void OnDeactivated()
This method is called when the component gets deactivated.
Definition Component.cpp:142
virtual void OnSimulationStarted()
This method is called once for active components, at the start of the next world update,...
Definition Component.cpp:144
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
Simple component manager implementation that calls an update method on all components every frame.
Definition ComponentManager.h:142
This class represents an object inside the world.
Definition GameObject.h:32
Turns an object into a fully physically simulated movable object.
Definition JoltDynamicActorComponent.h:35
Used to 'grab' physical objects and attach them to an object. For player objects to pick up objects.
Definition JoltGrabObjectComponent.h:22
float GetGrabbedActorMass() const
Returns the grabbed object's mass.
Definition JoltGrabObjectComponent.h:60
plComponentHandle GetGrabbedActor() const
Returns the grabbed object's actor component.
Definition JoltGrabObjectComponent.h:57
plGameObjectHandle m_hAttachTo
Definition JoltGrabObjectComponent.h:100
Reads a world description from a stream. Allows to instantiate that world multiple times in different...
Definition WorldReader.h:47
Stores an entire plWorld in a stream.
Definition WorldWriter.h:13
A handle to a component.
Definition Declarations.h:138
A handle to a game object.
Definition Declarations.h:76
Send this to components such as plJoltGrabObjectComponent to demand that m_hGrabbedObjectToRelease sh...
Definition PhysicsWorldModule.h:230
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12