mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-26 14:55:39 +00:00
Updates to various components, added a few new ones.
This commit is contained in:
parent
e0627973fb
commit
dac8d6e1fd
52 changed files with 4566 additions and 1799 deletions
|
|
@ -0,0 +1,46 @@
|
|||
#pragma once
|
||||
|
||||
#include "T3D/components/collision/collisionComponent.h"
|
||||
#include "T3D/components/physics/physicsComponent.h"
|
||||
#include "T3D/physics/physicsWorld.h"
|
||||
|
||||
class RaycastColliderComponent : public CollisionComponent
|
||||
{
|
||||
typedef CollisionComponent Parent;
|
||||
|
||||
//If we're velocity based, we need a physics component on our owner to calculate the vel
|
||||
bool mUseVelocity;
|
||||
PhysicsComponent* mOwnerPhysicsComponent;
|
||||
|
||||
//If we're not using velocity, we'll just have a set direction and length we check against
|
||||
VectorF mRayDirection;
|
||||
F32 mRayLength;
|
||||
|
||||
PhysicsWorld *mPhysicsWorld;
|
||||
|
||||
Point3F mOldPosition;
|
||||
|
||||
U32 mMask;
|
||||
|
||||
public:
|
||||
DECLARE_CONOBJECT(RaycastColliderComponent);
|
||||
|
||||
RaycastColliderComponent();
|
||||
~RaycastColliderComponent();
|
||||
|
||||
virtual bool onAdd();
|
||||
virtual void onRemove();
|
||||
static void initPersistFields();
|
||||
|
||||
virtual void onComponentAdd();
|
||||
virtual void onComponentRemove();
|
||||
|
||||
//This is called when a different component is added to our owner entity
|
||||
virtual void componentAddedToOwner(Component *comp);
|
||||
//This is called when a different component is removed from our owner entity
|
||||
virtual void componentRemovedFromOwner(Component *comp);
|
||||
|
||||
virtual void processTick();
|
||||
virtual void interpolateTick(F32 dt);
|
||||
virtual void advanceTime(F32 dt);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue