Collider has to have 'CollisionEnabled' set to 'Query and Physics' warning - possible bug?

Every so often in my project, I have a warning that tells me to ensure that my Blueprint’s sphere collider collision setting is set to either ‘Query and Physics’ or ‘Physics Only’.

However, the problem I have, as illustrated in the screenshots, is that my collider is set to use the physics settings suggested by the warning, but yet I am still presented with this pop up when I stop playing the game. Is it possible that this is a bug?

Hi TJ,

I’m not adding any impulse. In this case, the collectibles are spawned when a prop object is destroyed - they are spawned a little bit off of the floor so they can “pop up”, kind of like a typical 3D platformer collectible effect.

Hi jamiewhitephd,

In my tests I could only get this warning if I was attempting to add an impulse to a component that wasn’t simulating physics. What blueprint contains the add impulse setup? Could you provide some more screenshots and/or a small test project?

I’m still unable to get this warning with just a collectible that has a similar setup that you pictured above. Would you mind creating a small test project with the issue and uploading it here?

Posted this 4 days ago but it was deleted when moving it to an answer.

I’m still unable to get this warning with just a collectible that has a similar setup that you pictured above. Would you mind creating a small test project with the issue and uploading it here?

We haven’t heard back from you in a few days, so we are marking this post as resolved for tracking purposes. If you’re still experiencing this issue, please feel free to post back here with additional information to reopen the post.

Cheers,

TJ

Hi there,

After further experimentation I still cannot remove this warning. Could I have this question re-opened, please?

My issue is still the same as outlined in the question - this error appears in the output log: "PIE: Warning: PICKUP_LOOT_C_1.SPHERE_COLLIDER has to have ‘CollisionEnabled’ set to ‘Query and Physics’ or ‘Physics only’ if you’d like to AddImpulse. "

In my loot blueprint, there is only a collider (root) and a particle system. The root collider is set, despite the warning, to “Collision Enabled” and simulates physics. Yet, why does the warning still appear?

In my code, I have this in the BeginPlay function:

if (_spawnVelocity != FVector::ZeroVector)
		_collectCollider->SetPhysicsLinearVelocity(_spawnVelocity * (FMath::FRand() + _spawnVelocityPower));

The loot is spawned when a prop is destroyed.

Hi Jamie,

What version of the engine are you experiencing this in?

I’m using 4.17.2.

After a process of elimination I finally found out my problem.

What happens is that the pickup gets created upon the prop being destroyed. However, in the event the player is standing very close by when this happens, the engine detected an immediate collision (i’m guessing within the same frame) as the loot piece is spawned. In my pickup class, I set the collder to disable itself so it may float for a second before disappearing.

The problem was that after disabling the collision at the same time as it was being created, the initial upwards force I was adding to the actor when its created (to simulate a flurry of loot shooting upwards) was technically invalid, hence the error. This is because at the time of object’s creation, the physcis is, technically, turned off. I hope this makes sense.

It seemed a bit hacky, but in the end I left the collision enabled after collection but added a boolean that, when true (i.e. collected), stops any further pickup events.

1 Like