Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello , I have tried to add NPCs ( non playing characters) to my scene and used the included sleepwalker and animated man. First , I notice that my player ( it's a third person view) goes through these characters , as if they were transparent , even if I set them to "collide when moved" I set one NPC to : -stand still -have a "game actor behaviour The other one : -walk along a path -game actor In either case , my player just goes through them... Maybe I missed a parameter , can you help me please ? |
||||
|
Hey. I think you also need to enable physics engine in order for it to work. (that is the only non-programming way i know , someone can correct me. In the Publishing settings, you set Physics Engine to: Physics Simulation and this should make it work, so you can make NPCs collision box collide with your players collision box. (make sure to position the collision spheres so they fit the characters, and that they are set to "collide when moved"). |
||||
|
You can try a method that doesn't require the "Physics Simulation" feature. You must create an invisible static mesh around each character. I created this CCB file as an example for you: https://drive.google.com/file/d/... When you load that file, you will see the "animated sleepwalker" and the "animated man". An invisible cube is attached to each of them as a child node. Each character is inside of its cube. Try this: 1. Open the CCB file. 2. Press the Publish button to test it. 3. Then, use the WASD keys to move the first character, and the arrow keys to move the second character. The characters will collide like normal humans instead of walking through each other. Play with the size of the collision boxes until you're happy with the points of detection, but remember this: The boundary of the "Collide When Moved" Behavior of each character must NOT exceed the boundary of the invisible box. Resize and reposition the "Collide When Moved" shape until it's fully within the dimensions of the invisible box. To make the boxes visible so you can modify them easily, go to the "Materials" pane of "cubeMesh1" and "cubeMesh2" and switch their Lighting settings from "Dynamic" to "Static (lightmaps)", and switch the other option from "Transparent (add)" to "Solid". |
||||
|
To Fraktal and wild-master : thanks a lot for your answers ! Special thanks to wild-master for taking the time to create an example ! I think it will be useful to many other beginners like me. The example works great. If you ever need beta testers for your project , or help with translation work ( I'm French ) , you can ask me, no problem ! |
|