Collision

  • 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.

Fuzzpilz

klkk
Jun 28, 2000
984
0
0
40
:noitacoL
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?
 

EasyRaider

Crazy coder
Sep 21, 2001
74
0
0
43
Norway
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.)
 

Fuzzpilz

klkk
Jun 28, 2000
984
0
0
40
:noitacoL
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.
 

EasyRaider

Crazy coder
Sep 21, 2001
74
0
0
43
Norway
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.
 

Fuzzpilz

klkk
Jun 28, 2000
984
0
0
40
:noitacoL
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.
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
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().