Forum rules - please read before posting.

Make a NPC collider doesn't collide with the player/layer?

Hello again. I'm having some trouble creating multiple hotspots for an NPC in order to examine different parts of their body and items they might be carrying. The main NPC collider is getting in the way and preventing the hotspots from being interactable. I've tried ignoring raycast, but it hasn't worked.

Additionally, I'm having problems with the capsule collider as the NPC has animations such as laying down on the ground, and the capsule doesn't follow these animations. I attempted to solve this by adding colliders for each body part and making the capsule just a point on the ground, but this causes the NPC's head movement (with the animation blend tree) to behave as though the player is in the sky.

I'm not sure how feasible it is to solve these issues, but perhaps there is a way to offset the NPC's head movement to accommodate having the point on the ground instead of a full capsule collider.

Thanks again.

Comments

  • What are your AC and Unity versions?

    The main NPC collider is getting in the way and preventing the hotspots from being interactable. I've tried ignoring raycast, but it hasn't worked.

    Making sure the NPC's main collider is on the Ignore Raycast layer should be the right approach - you can test this by attaching a Hotspot to the root object (that has the main collider) and see if that's detected like a regular Hotspot.

    Are the layers correct at runtime? Share screenshots of the root object Inspector / Scene view, as well as that of a typical body part.

    perhaps there is a way to offset the NPC's head movement to accommodate having the point on the ground instead of a full capsule collider.

    If you assign their Neck bone Transform in their NPC Inspector, then that will be used as a reference for relative positioning, rather than the top of their collider. If doing to doesn't improve behaviour, could you share screenshots to illustrate the situation?

  • So, apparently the problems was caused by Auto-sync Hotspot state, I deactivated it and it does ignore the raycast now.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.