Making a static mesh vanish
Is this possible without touching code? I'm trying to make a static mesh vanish once a player touches it. I'd like to do it simply with kismet but I know that's probably not going to happen
I'm almost sure it can be done with kismet, will play around with this tonight.
In Kismet is as simple as event 'MyStaticMesh Touched' => Destroy (linked up with MyStaticMesh obj variable).
In code it's a bit more tricky, as the .Destroy function doesn't work as expected. But you can always trick it by setting the mesh to be hidden and removing any collisions with it:
MyHitActor.SetCollision(false, false, false);
It should be that easy, almost but not quite. You have to have an InterpActor and change the collision type to touch all.
Originally Posted by Kaldrick
Heres the step by step...
Place a static mesh and then right click on it and -Convert to Mover-
OR place an InterpActor (Movers and InterpActors are same thing)
Go to the properties and change -Collision, Collision Type- to COLLIDE_TouchAll
With it still selected, open Kismet.
Right click and select -New Event Using InterpActor_??-
Right click and create a second new kismet node -Actor, Destroy-
Conect the -Touched- from the event to the -In- of the Destroy
Still selected, right?
Right click on the Destroy I/O connector called Target and create -New Object Var from InterpActor_??
This should now cause the mesh to dissapear when you touch it, if not, make sure -Movement, Physics- is set to PHYS_Interpolating.
Awesome. Thanks for the help.
I did try the destroy action in kismet but it didn't do anything and I quit after a short time playing with it. As a temp, I actually did a Matinee which just took the object through the floor at a really high speed which had the same effect of it just vanishing. This is better though
Thanks to both of you.