stride
stride copied to clipboard
Not Adding Physics Shape To The Character Causes Unhandled Exception
Release Type: Official Release
Version: Version 4.0
Platform(s): All
Describe the bug if you don't add a physics shape to the character component and call any physics function for that character you'll get the following error : Unhandled Exception: System.InvalidOperationException: Attempted to call a Physics function that is avaliable only when the Entity has been already added to the Scene.
To Reproduce
- add a characterComponent to an entity
- create a new script and add it to that entity
- in the script create a characterComponent variable then reference it through either game studio or code
- call any function for that characterComponent such as SetVelocity
- try running the game and you'll get an error
Expected behavior have a clear error that says "character doesn't have physics shape" or something similar