Mesh with Sphere Controller collision

0

Hi,

 I'm trying to import a static mesh with collision, I search here but all solutions doesn't work for my case.

I'm using Lumberyard 1.7, and this is the steps: 1) Open FBX Importer, import Shapes from SamplesProject (samplesprojects\Objects\Tutorials\Fbx) select "all physics meshes" and Material.

  1. Put the shapes.cfg (with material - PhysicsNoDraw and the Material) and Sphere_Controller_Complete in a level. Sphere go through the mesh.

Here a video: https://www.twitch.tv/videos/118917505

What am I doing wrong? Thank you.

asked 7 years ago192 views
6 Answers
0
Accepted Answer

Hey @REDACTEDUSER

After watching your video, it does appear you are missing a few steps for your shapes.cgf asset after you drag it into the scene. By default, when you drag a static object (.cgf) into the scene, it will only have the Transform and Static Mesh components. You need to add additional components in order for the physics/collision mesh to behave correctly.

Here are some steps after you've imported your FBX asset:

  1. Drag the shapes.cgf into the level from the File Browser.

  2. Open the Entity Inspector (PREVIEW) window to see the components on your entity.

  3. You should see the Transform and Static Mesh components on your object. REMOVEDUPLOAD

  4. Click on the "Add Component..." button in the Entity Inspector (PREVIEW) window, located just under the name of your entity.

  5. Navigate to the Physics and click on the Physics component. This will add the Physics component to your entity so the entity will have physics response.

  6. You will need to add a Physics Behavior by clicking on the + button on the right side of the "Cry Physics Behavior (empty)" text.

  7. A window will pop up called Class to create.

  8. You can choose from Static Body or Rigid Body in the drop down menu. Click OK when you've picked which type of physics to use for your shapes.cgf.

  9. Your Physics component should look like this now. REMOVEDUPLOAD

  10. You also need to assign the collision mesh. Click on the "Add Component..." button again.

  11. Navigate to Physics > Colliders and click on Mesh Collider since you imported a specific collision mesh for your shapes.cgf. This will add the Mesh Collider component to your entity.

REMOVEDUPLOAD

  1. You can add your Sphere_Controller_Complete prefab to add the robot to your level, and when you run the game, the robot should collide with your shapes.cgf. Let us know if that helps.
answered 7 years ago
profile picture
EXPERT
reviewed a year ago
0

Hey @REDACTEDUSER

answered 7 years ago
0

Thank you for your answer Bink_LY, but I have tried this many times as show in the video that I attached, is there another approach?

answered 7 years ago
0

Hey @REDACTEDUSER

answered 7 years ago
0

Hi @REDACTEDUSER

Thank you so much, it's work!!

answered 7 years ago
0

Happy to help! Glad it works for you now!

answered 7 years ago

This post is closed: Adding new answers, comments, and votes is disabled.