Jump to content

Gaia Pro 2023 and First Person Controller


ironcladmerc
Go to solution Solved by Peter,

Recommended Posts

I'm trying to use the Unity first person controller from the asset store in Gaia Pro 2023, and when I go into play mode I get this error, and it never progresses beyond about 25% of loading:

Quote

MissingComponentException: There is no 'Rigidbody' attached to the "PlayerCapsule" game object, but a script is trying to access it.
You probably need to add a Rigidbody to the game object "PlayerCapsule". Or your script needs to check if the component is attached before using it.
Gaia.RigidbodyWaitForTerrainLoad.Start () (at Assets/Procedural Worlds/Packages - Install/Gaia/Gaia Pro/Scripts/Core/Multi-Terrain System/RigidbodyWaitForTerrainLoad.cs:38)


 

I am using the terrain loading , the project is 4x4 scenes.  I tried adding a Rigid body component to it, and it does load but the capsule just rolls around the terrain, I have no control over it.

Any idea what the fix is? 

Link to comment
Share on other sites

Hi @ironcladmerc I fear this might be a bug in the new Gaia Version - what this script does is it prevents the player character from falling under the terrain while the terrains are still being loaded into the scene. Usually the gravity calculations are done via a rigidbody on a player character, so the script pauses that rigidbody until the terrains are loaded, and activates it then.
I will review this and should have a fix for this shortly, what you can do in the meantime as a workaround is to deactivate the RigidbodyWaitForTerrain script on the player and place the player character a bit above the terrain so it has less of a chance of slipping below the terrain surface while it is still loading.

Link to comment
Share on other sites

  • Solution

@ironcladmerc I reviewed the script, and I found that it is set up correctly in theory: The first person controller is deactivated by default, but the WaitForTerrainLoad script has it as a component that should be activated once the terrain is loaded below the player.

image.png

However due to the missing rigidbody error you were seeing in the console, the activation never takes place correctly. Please find attached a patch to fix the script, you can install it via Assets > Import Package > Custom Package in the unity editor.

Gaia2023RigidbodyErrorHotfix.zip

Once the patch is installed the script should work correctly again with the First Person Controller as well.
 

Link to comment
Share on other sites

Thank you for the update! 
If you are happy with the support and our new asset, please consider leaving a review on the Unity asset store. 
It would help us out a lot! 

Cheers and happy development! 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...