Ejemplo n.º 1
0
//-----------------------------------------------------------------------------
//  SetLinearDamping
//-----------------------------------------------------------------------------
void    CPhysicObj::SetLinearDamping (float fLinearDamp)
{
    assert( m_bActivated );

    int nNumParts = GetNumParts();
    for (int i = 0; i < nNumParts; i++)
    {
        SetLinearDamping (fLinearDamp, i);
    }
}
Ejemplo n.º 2
0
BipedDef::BipedDef()
{
	SetMotorTorque(2.0f);
	SetMotorSpeed(0.0f);
	SetDensity(20.0f);
	SetRestitution(0.0f);
	SetLinearDamping(0.0f);
	SetAngularDamping(0.005f);
	SetGroupIndex(--count);
	EnableMotor();
	EnableLimit();
	
	DefaultVertices();
	DefaultPositions();
	DefaultJoints();

	LFootPoly.friction = RFootPoly.friction = 0.85f;
}
Ejemplo n.º 3
0
UFlareAsteroidComponent::UFlareAsteroidComponent(const class FObjectInitializer& PCIP) : Super(PCIP)
{
	// Mesh data
	bTraceComplexOnMove = true;
	SetSimulatePhysics(true);
	SetLinearDamping(0);
	SetAngularDamping(0);

	// FX
	static ConstructorHelpers::FObjectFinder<UParticleSystem> IceEffectTemplateObj(TEXT("/Game/Master/Particles/PS_IceEffect.PS_IceEffect"));
	static ConstructorHelpers::FObjectFinder<UParticleSystem> DustEffectTemplateObj(TEXT("/Game/Master/Particles/PS_DustEffect.PS_DustEffect"));
	IceEffectTemplate = IceEffectTemplateObj.Object;
	DustEffectTemplate = DustEffectTemplateObj.Object;

	// Settings
	PrimaryComponentTick.bCanEverTick = true;
	IsIcyAsteroid = true;
	EffectsCount = FMath::RandRange(2, 5);
	EffectsScale = 0.05;
	EffectsUpdatePeriod = 0.5f;
	EffectsUpdateTimer = 0;
}