Here you go, A static mesh that can roll and be moved around:
Code:
class RollingSphere extends Actor
placeable;
var StaticMeshComponent PhysicalMesh;
event PostBeginPlay()
{
SetCollision( true, true );
SetPhysics( PHYS_RigidBody );
PhysicalMesh.WakeRigidBody();
}
DefaultProperties
{
Begin Object Class=StaticMeshComponent Name=PhysicsMesh
HiddenGame = false
StaticMesh = StaticMesh'EngineMeshes.Sphere'
Scale = 0.25
CollideActors = true
BlockActors = true
BlockRigidBody = true
BlockZeroExtent = true
BlockNonZeroExtent = true
bDisableAllRigidBody = false
RBChannel = RBCC_GameplayPhysics
RBCollideWithChannels = {(
BlockingVolume = TRUE,
Cloth = false,
Clothing = false,
ClothingCollision = false,
Deadpawn = false,
Default = TRUE,
EffectPhysics = false,
FluidDrain = false,
FracturedMeshPart = false,
GameplayPhysics = TRUE,
Pawn = false,
SoftBody = false,
Untitled1 = false,
Untitled2 = false,
Untitled3 = false,
Untitled4 = false,
Vehicle = false,
Water = false
)}
RBDominanceGroup = 15
bNotifyRigidBodyCollision = false
ScriptRigidBodyCollisionThreshold = 0.0;
End Object
Components.Add(PhysicsMesh)
CollisionComponent = PhysicsMesh
PhysicalMesh = PhysicsMesh
}
You'd still have to enable the physics the same way for a skeletal mesh to have it, there's no difference other then unecessarily adding and skinning it to a bone, then also having a mesh that's slight more performance intensive. Animating skeletal meshes are a bit more resource hogging. It wouldn't be much with just one bone, but still, when there's no reason to have it, there's no reason not to shave that extra bit off.
Bookmarks