1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

detecting collision (touc(), hitwall or something?)

Discussion in 'Programming' started by RestInPieces, Feb 19, 2002.

  1. RestInPieces

    RestInPieces New Member

    Joined:
    Sep 20, 2001
    Messages:
    65
    Likes Received:
    0
    Say I've got an actor, and I want this actor (bCollideActors==true, bCollideWorld==false) to do something when it hits level geometry, what function do i have to override?
    touch() seems only to work with non-brush actors, and hitwall doesn't work at all :(
    btw, does a pawnas touch() only get called if its blockplayer==false?
     
  2. Wang

    Wang Wibble

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    I believe the Bump function might do what you want, but I'm not sure. Since you have bCollideWorld==false nothing may happen.
    If Bump is the way to go I'm not even sure how you would use it as I seem unable to get it working for the mutator I'm working on.

    I got my info from this page

    http://www.unrealscript.com/tutorials/tut27.php
     
    Last edited: Feb 19, 2002
  3. Brood_of_Evil

    Brood_of_Evil Selene's martyr

    Joined:
    Nov 3, 2001
    Messages:
    147
    Likes Received:
    0
    If you want the Bump() function to work for your class, you will have to set either bBlockPlayers or bBlockActors to true.

    Btw, is that you Joe? I saw the post about my signature in kage's bb, but since it's screwed up I couldn't reply, so yeah you can use the banner for your sig :)
     
  4. RestInPieces

    RestInPieces New Member

    Joined:
    Sep 20, 2001
    Messages:
    65
    Likes Received:
    0
    Bump doesn't work since i want to detect collision with the level geometry :(
    btw, i found the answer to my other question:

    "...When it comes to event functions being called, be forewarned. Sometimes, the engine will not call both Touch() and Bump() - if both objects are bBlockPlayers, Bump() will be called, Touch() won't. If one object is bCollideActors and the other is bBlockActors, the object being bumped (the bCollideActors object) will get a Bump() event while the other will simply get a Touch() call." (end of quote, taken from the phyics tut over at chimeric)

    Still looking for a function that gets called when my actor collides with the level, the other solution would be to fire a trace each tick :(
     
  5. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    you could spawn an invisable actor that follows/trails the other actor and set the invis actor to collide with geometry destroyed when collides with geometry and be like:
    Code:
    var actor invisACT;
    
    if (invisACT==None)
       {
       whateveritisyouwanttodo();
       invisACT = Spawn(class'Spawn the actor again',,,)
       }
    
    
     
  6. TaoPaiPai

    TaoPaiPai Commisaire Van Loc

    Joined:
    Jun 13, 2000
    Messages:
    1,626
    Likes Received:
    0
    Not sure ,but I think the landed() function is called when you hit geometry.Then you have to check the geometry normal.

    bCollideWorld has to be true
     
  7. Silver_Ibex

    Silver_Ibex Member

    Joined:
    Feb 27, 2001
    Messages:
    654
    Likes Received:
    0
    You could try looking at the shell casings in particular, or any other projectile for code to handle collision with level geometry.

    They have a bounce function also.
     
  8. butto

    butto Red Orchestra Coder

    Joined:
    Dec 2, 2001
    Messages:
    693
    Likes Received:
    0
    HitWall() is called when any any level geometry is hit. Landed() is called when any wall on the ground is hit (I *think* only if it has PHYS_Falling). Touch() is called when another colliding actor is hit I believe.
     
  9. RegularX

    RegularX Master of Dagoth Lies

    Joined:
    Feb 2, 2000
    Messages:
    1,215
    Likes Received:
    0
    The grenade is a good one, it has bounce, hitwall, landed, etc. I used it last night to code something that drops from dead players because I love how the nade bounces off walls...



    rgx
     
  10. RestInPieces

    RestInPieces New Member

    Joined:
    Sep 20, 2001
    Messages:
    65
    Likes Received:
    0
    Well, thx@all, I guess it doesn't work beacause the location is set through UScript code, not through native Physics code :/
     

Share This Page