Hello, been banging my head against a wall for the past couple of days, but here is what im trying to accomplish: spawn an actor that has rigid body functions with some velocity in a direction, though not a projectile. Basically a kind of UT_grenade spawning, but i have looked in the code and I cannot see what happens in it’s Init() function that does all of this physics work.
It spawns, but it just floats with errors like…
**SkelMesh has: MinDistFactorForKinematicUpdate is > 0.0f and in PHYS_RigidBody. This will probably result in it falling out of the world. Component: uedpiediskgolfcourse.TheWorld:PersistentLevel.DGDisk_0.SkeletalMeshComponent_1 SkeletalMesh: DG_aDisk
Warning: USkeletalMeshComponent::SyncActorToRBPhysics(): no PhysicsAssetInstance for DGDisk uedpiediskgolfcourse.TheWorld:PersistentLevel.DGDisk_0 with skeletalmesh: NULL
ScriptWarning: Accessed None ‘PhysicsAssetInstance’**
here is my actor that i want to spawn with physics, this just has relevant functions and vars. it is called from playercontroller. Please someone help I have basically the EXACT same code for my pawn that dies and becomes a ragdoll that WORKS.
Why does it say i am missing a physics asset instance? I have one with it!
class DGDisk extends KAsset notplaceable;
function Throw(vector Dir, float Power, float Angle)
{
Velocity = Glide * Power * Dir;
Acceleration = Fade * Normal(Velocity);
SetRotation(Rotator(Dir));
SetPhysics(PHYS_RigidBody);
SkelMesh.MinDistFactorForKinematicUpdate = 0.f;
SkelMesh.SetRBChannel(RBCC_Default);
SkelMesh.SetRBCollidesWithChannel(RBCC_Default, true);
SkelMesh.SetRBCollidesWithChannel(RBCC_Pawn, true);
SkelMesh.SetRBCollidesWithChannel(RBCC_Vehicle, false);
SkelMesh.SetRBCollidesWithChannel(RBCC_Untitled3, false);
SkelMesh.SetRBCollidesWithChannel(RBCC_BlockingVolume, true);
SkelMesh.ForceSkelUpdate();
SkelMesh.SetTickGroup(TG_PostAsyncWork);
//CollisionComponent.SetActorCollision(true, true);
SkelMesh.PhysicsWeight = 1.0;
if (SkelMesh.bNotUpdatingKinematicDueToDistance)
{
SkelMesh.UpdateRBBonesFromSpaceBases(true, true);
}
SkelMesh.PhysicsAssetInstance.SetAllBodiesFixed(false);
SkelMesh.bUpdateKinematicBonesFromAnimation = false;
SkelMesh.SetRBLinearVelocity(Velocity, false);
SkelMesh.ScriptRigidBodyCollisionThreshold = 1200.0f;
SkelMesh.SetNotifyRigidBodyCollision(true);
SkelMesh.WakeRigidBody();
// if bump a DGGoal and this is current goal, round completed.
}
defaultproperties
{
bStatic=false
bNoDelete=false
bCollideWorld=true
Begin Object class=SkeletalMeshComponent Name=Mesh
SkeletalMesh=SkeletalMesh'DGAssets.Models.DG_aDisk'
PhysicsAsset=PhysicsAsset'DGAssets.Models.DG_aDisk_Physics'
bHasPhysicsAssetInstance=true
CollideActors=true
BlockActors=true
BlockRigidBody=TRUE
bCacheAnimSequenceNodes=FALSE
AlwaysLoadOnClient=true
AlwaysLoadOnServer=true
bOwnerNoSee=false
CastShadow=true
bUpdateSkelWhenNotRendered=false
bIgnoreControllersWhenNotRendered=TRUE
bUpdateKinematicBonesFromAnimation=true
bCastDynamicShadow=true
RBChannel=RBCC_GameplayPhysics
RBCollideWithChannels=(Default=TRUE,BlockingVolume=TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE)
bOverrideAttachmentOwnerVisibility=true
bAcceptsDynamicDecals=FALSE
TickGroup=TG_PreAsyncWork
MinDistFactorForKinematicUpdate=0.2
bChartDistanceFactor=true
RBDominanceGroup=20
bUseOnePassLightingOnTranslucency=TRUE
bPerBoneMotionBlur=true
End Object
SkelMesh=Mesh
Components.Add(Mesh)
Begin Object class=CylinderComponent Name=CollisionCylinder
CollisionRadius=6.000000
CollisionHeight=1.000000
BlockNonZeroExtent=true
BlockZeroExtent=true
BlockActors=true
CollideActors=true
End Object
Components.Add(CollisionCylinder)
}