The player clicks on a chair and sits on the chair

Hello everyone, I recently migrated from Unreal to PlayCanvas. I’m working on a project where I already have player movement; my character can walk forward, backward, and side to side. What I need to do is make the player sit on a chair when I click on it. I already have the sitting animation as well. What do I need to do? If there’s any topic with the same issue and you can help me with the link, I will delete this post if there’s another similar one.

Hi @bannaker and welcome!

You first need to detect a click on the chair entity. Personally I would use collision for this. You need to add a collision component and a rigidbody component. You also need to import the Ammo module to your project. Below some related manual pages.

After that, you probably want to prepare your player entity and set the correct position and rotation. Finally you can start the correct animation.