The Wayback Machine - https://web.archive.org/web/20201106130151/https://github.com/stride3d/stride/issues/760
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Adding Physics Shape To The Character Causes Unhandled Exception #760

Open
salahchafai opened this issue Jun 14, 2020 · 0 comments
Open

Not Adding Physics Shape To The Character Causes Unhandled Exception #760

salahchafai opened this issue Jun 14, 2020 · 0 comments

Comments

@salahchafai
Copy link
Contributor

@salahchafai salahchafai commented Jun 14, 2020

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

  1. add a characterComponent to an entity
  2. create a new script and add it to that entity
  3. in the script create a characterComponent variable then reference it through either game studio or code
  4. call any function for that characterComponent such as SetVelocity
  5. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.