I’m new with Kactors, I’m trying to spawn some, using code, and most of them have a drawscale of 0.5, but the collision works like the drawscale were 1.0.
This is the code, I’m using Kactorspawnable:
A = Spawn(class'KactorSpawnable',,, SomeLocation, SomeRotation,,false); A.StaticmeshComponent.setstaticmesh(SomeStaticMesh); A.CollisionComponent = A.P.StaticMeshComponent; A.SetDrawScale(0.5);
I assing diferent staticmeshes from an array, so I can set them in the defaultproperties. I have tried setting Phys_none before the assignaments and Phys_rigidbody after, wakerigidbody, etc. With no result.
Also I have this error with all the actors, like this:
AActor::SyncActorToRBPhysics: Invalid or Missing BodyInstance in CollisionComponent. (check to make certain your object actually has a collision volume) for: KActorSpawnable tests.TheWorld:PersistentLevel.KActorSpawnable_21 CollisionComp: StaticMesh FoliageDemo.Mesh.S_ShanePlant_01 StaticMeshComponent_35 DetailedInfo: FoliageDemo.Mesh.S_ShanePlant_01
I have the same error with skeletalmeshes when goes out the ragdoll state with transition, never found a way to fix that.
How I can fix these two things?
(From the editor, converting these staticmeshactors to Kactors works with no problem, with drawscale 0.5 or others, and with no bodyinstance errors.)