Trigger Area does not trigger (script canvas)

Hello, no matter what I tried I was not able to make Trigger Area work with my player controlled sphere. For some reason, it does trigger on a camera following the sphere but not the sphere itself when I set it to Activate by All Entities.

Images here because of 1 pic limit: https://imgur.com/a/B8NB5e5

Every help much appreciated :slight_smile:

Trigger area to my knowledge doesnt support PhysX which could be your problem, 1.21 though has support for trigger events so if you havent switched over to that version, i recommend doing so…otherwise you would have to use legacy physics to get the functionality you are looking for.

hope that helps.

1 Like

Thank you for the fast response. I actually am using 1.21 (upgraded from 1.18) for 3 days now so I will try look for how to use Trigger Events.

I would actually like to keep using Physx because that was the only way I figured out how to apply pressure to actually spin the ball. I guess if Trigger Events won’t work, I can still attach some invisible object and place it in front of a camera to work as an trigger.

By the way, do you know if static objects can use their mesh for Physx colliders?

yes, but you are better to make special simplified version of mesh for this
https://docs.aws.amazon.com/lumberyard/latest/userguide/component-physx-collider.html#creating-mesh-colliders

yea as fluffy stated it possible, you will want to create a pxmesh in the FBX settings to achieve this, its still needs some work so it probably hit or miss but check it out!.

I also have a tutorial dealing with the triggers using physX collider so I let you know if i run into any issues

Could you please link me the tutorial?

1 Like

recording it today, soon as its uploaded ill post a link here

1 Like

@MagicD3VIL I actually think i may see your problem, the trigger area component you are using is for legacy physics and wont work with PhysX as those two dont “communicate” with each other.

so what you will want to do instead is to add a PhysX collider instead and tick the “Trigger” checkbox so its treated like a trigger area, resize it to how you want…make sure the other has PhysX rigidbody and Physx Collider (i believe you have this based of your screenshot) and you should be good to go…

Oh switch out those trigger nodes for the one under PhysX > Trigger category in Script canvas.

one last thing i recommend is using the Debug gem, for better debugging options so instead of using print you can use “draw text on screen” node so its just easier to spot when something is triggered.

a9930ea5754f6f3b04f6a25425ce442d

The number on the node represents the amount of seconds you want it to show on the screen before it disappears.

1 Like

PhysX triggers now works as intended for me, thanks for clearing that out. I appreciated your help :slight_smile:

1 Like

np! glad i could help

2 Likes