About Store Forum Documentation Contact
Donations:
225$/mo



Post Reply 
NPCs and sitting
Author Message
Pixel Perfect Offline
Member

Post: #1
NPCs and sitting
I have been experimenting with getting my NPCs to sit on chairs etc and am finding in order to get this to work I'm having to use a tiny character controller to simply maintain physics with the floor but avoid the other collisions that would otherwise take place. The pic below shows my initial approach with the arrow pointing at the controller (I've remove the physics from the tables, chairs etc to show the controller more clearly).

I was wondering if anyone else had any ideas or had come up with other solutions to implement this?

   
03-31-2014 04:32 PM
Find all posts by this user Quote this message in a reply
SamerK Offline
Member

Post: #2
RE: NPCs and sitting
I never did that before, but I think you can achieve that by making the chair physics body as a box but its height is lowered to be enough for ground collision, this would keep the upper chair part collision free and then sitting animation can be performed.

good luck.
(This post was last modified: 03-31-2014 07:16 PM by SamerK.)
03-31-2014 07:14 PM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #3
RE: NPCs and sitting
Thanks SamerK, that seems like a simpler solution. I'll experiment with that. It seems either way something has to loose it's collision physics. I had wondered about assigning the chairs to a separate physics group and deactivating collision with the NPCs, that way collision could be maintained for the player.
03-31-2014 07:54 PM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #4
RE: NPCs and sitting
Why not just have the engine ignore the physics between NPC and the chair while they are in the 'sitting' state?
03-31-2014 08:34 PM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #5
RE: NPCs and sitting
Good point Rubeus ... more food for thought, thanks smile
03-31-2014 09:23 PM
Find all posts by this user Quote this message in a reply
Post Reply