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.

Collision

Discussion in 'Programming' started by Fuzzpilz, Oct 30, 2001.

  1. Fuzzpilz

    Fuzzpilz klkk

    Joined:
    Jun 28, 2000
    Messages:
    984
    Likes Received:
    0
    I'm writing a little something (I don't want to make a joke of myself by mentioning what it actually is and then failing to complete it) and I need to check whether it's currently on top of something else, especially the world geometry. Checking whether Base is None didn't work; neither did tracing downwards a little bit further than the CollisionHeight, the latter logically because the thing could be standing on top of something with only part of its cylinder, but not its center. Can anybody help?
     
  2. EasyRaider

    EasyRaider Crazy coder

    Joined:
    Sep 21, 2001
    Messages:
    74
    Likes Received:
    0
    It would be easier if I knew what you're trying to do. Is this some object that will bounce around and you need to check if it has landed?

    You could try a trace with an extent close to CollisionRadius or something. It wouldn't be completely accurate, but it should work. (I'm not sure, but extent is a vector, so I think it would be like checking collision with a box instead of a cylinder.)
     
  3. Fuzzpilz

    Fuzzpilz klkk

    Joined:
    Jun 28, 2000
    Messages:
    984
    Likes Received:
    0
    It's something that needs to move, keeping to the ground, but for some reason PHYS_Walking doesn't work (perhaps it has to be a pawn for that, but for reasons I don't want to explain yet I don't want it to be a pawn), so I have to switch between PHYS_Projectile and PHYS_Falling. It appears to be impossible to set velocities in anything except PHYS_Projectile.
     
  4. EasyRaider

    EasyRaider Crazy coder

    Joined:
    Sep 21, 2001
    Messages:
    74
    Likes Received:
    0
    So you use PHYS_Projectile when it's on the ground and PHYS_Falling when it's not? Have you investigated Landed() and BaseChange() functions? I am most likely overlooking something, but I can't quite see your problem. Anyway, try tracing with an extent, if you haven't already.
     
  5. Fuzzpilz

    Fuzzpilz klkk

    Joined:
    Jun 28, 2000
    Messages:
    984
    Likes Received:
    0
    Yes, I've tried Landed and BaseChange. I'm not quite sure when BaseChange is called, though. Anyway, Base appears to be None when the object is resting on world geometry.
     
  6. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,909
    Likes Received:
    35
    Basechange() is called by SetBase(Actor) and Landed() is called when Physics is changed from PHYS_Falling to PHYS_None (I think). So you should try checking for PHYS_None or use HitWall() and Touch().
     

Share This Page