Hello!
I have an issue I haven't quite nailed down yet in my game where I'd like to make some of the small creatures wandering around into pickup objects that can be tossed.
The creatures are Navmesh agents bridged to the Opsive TPC and controlled by Behavior Designer trees. The problem seems to be that the TPC controller assigns a rigidbody to the creatures that it must use to move them. This TPC rigidbody interferes with the rigidbody assigned to its parent pickup object thus the creature doesn't move but the pickup item itself does. Deleting the TPC element makes everything work fine of course.
I can click it, pick it up and throw it. However, the pickup collider moves but the creature stays anchored and immobile as if it isn't a child being affected.
Any ideas?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
It's possible that temporarily disabling the TPC element - as opposed to removing it completely - is enough. The OnGrabMoveable / OnDropMoveable custom events can be used to modify an object while held by the player:
http://pasteall.org/1409043/csharp
Since you're looking to throw these objects, however, I'd expect that re-enabling the TPC element after the player lets go would cause them to again freeze in midair. How to get around that would be a question for Opsive.
Thank you for the assistance!