How access PhysicalMaterial from Actor Class?

Posted by EmAdpres on Game Development See other posts from Game Development or by EmAdpres
Published on 2012-11-20T15:51:45Z Indexed on 2012/11/20 17:21 UTC
Read the original article Hit count: 232

Filed under:
|

I use Projectile for my weapon system and UDKProjectile has two main function to handle Hit of projectiles(=bullet of my weapon):

  1. simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal) // For Actors
  2. simulated event HitWall(vector HitNormal, actor Wall, PrimitiveComponent WallComp) // Everything except Actors ( I guess)

the first method, the function just give me the actor which I hit and my question is How I can get that actor's physical material by first parameter ( Other ), in order to make a proper react about it ( for example a proper Sound of collide ) ...

A tricky (but hateful ) way which I knew works is, make a Trace from a little back of that actor to that actor, and use HitInfo parameter which include physical Material ! But there should be a more standard way !

© Game Development or respective owner

Related posts about programming

Related posts about udk