Hello I am having another problem with unrealscript involving touching actors. I have two meshs in the level and I have them touching eachother and I am trying to find them in code. I first use the AllActors iterator and find the mesh with the tag "NewToucher" which is one of the touching meshs. Next I use TouchingActors on that to see what actor it is touching except it doesn't log that it found one. I'm just using two static meshs from UT3 to check this. Here is my code thanks.
Code:var Actor NewToucher; exec function FindTouching() { local Actor testActor; foreach AllActors(class'Actor',testActor) { if(testActor.Tag == Name("NewToucher")) { NewToucher = testActor; `log("Found NewToucher"); } } foreach testActor.TouchingActors(class'Actor', testActor) { `log("Found Touching Actor: "$testActor); } }



Reply With Quote

Bookmarks