Hi,
I am having a hard time figuring out how to set boolean value based on collision hit. I am trying to prevent player from being able to move vehicle pawn when the pawn is not touching the ground. The contact with ground is done using physics rigid body simulation. I am initially able to flip the boolean value when the vehicle first touches the ground, as it lands on the ground, and then I can continually set that boolean value to True state as long as the event Hit keeps firing when the vehicle is constantly in contact with ground. But I have hard time figuring out how to detect when the collision stops.
I tried "IsValid" for the other Actor hit result, but that's not evaluated if the Hit event doesn't fire, and hit event doesn't fire when it's not in contact with anything else, so I can't really use that either. I am currently using poor workaround with overlap, but it's very sub-optimal.
Basically all I need is to continuously detect if my rigid body is colliding with anything else, and return boolean value based on that.
Thank you in advance.
I am having a hard time figuring out how to set boolean value based on collision hit. I am trying to prevent player from being able to move vehicle pawn when the pawn is not touching the ground. The contact with ground is done using physics rigid body simulation. I am initially able to flip the boolean value when the vehicle first touches the ground, as it lands on the ground, and then I can continually set that boolean value to True state as long as the event Hit keeps firing when the vehicle is constantly in contact with ground. But I have hard time figuring out how to detect when the collision stops.
I tried "IsValid" for the other Actor hit result, but that's not evaluated if the Hit event doesn't fire, and hit event doesn't fire when it's not in contact with anything else, so I can't really use that either. I am currently using poor workaround with overlap, but it's very sub-optimal.
Basically all I need is to continuously detect if my rigid body is colliding with anything else, and return boolean value based on that.
Thank you in advance.
Comment