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

Closed
ghost opened this issue Jun 14, 2020 · 4 comments
Closed

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

ghost opened this issue Jun 14, 2020 · 4 comments
Labels
area-Physics enhancement New feature or request good first issue Good for newcomers priority-Medium Important but not necessarily needed can be in release or not. work-estimate-S Good for first timers. A relatively quick item to fix, Max of 2x of XS

Comments

@ghost
Copy link

ghost 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

@ghost ghost added the bug Something isn't working label Jun 14, 2020
@Eideren Eideren added enhancement New feature or request good first issue Good for newcomers area-Physics help wanted and removed bug Something isn't working labels Jun 18, 2020
@bmello4688 bmello4688 added priority-Medium Important but not necessarily needed can be in release or not. work-estimate-S Good for first timers. A relatively quick item to fix, Max of 2x of XS labels Dec 1, 2020
@r00terAF18
Copy link

Hello, I would like to give this bug a try, any guidance? Thank you

@tebjan
Copy link
Member

tebjan commented Jul 21, 2021

@r00terAF18 hello, thanks for having a look at this, very nice to hear. i think the first step would be to reproduce the bug with visual studio attached and break at the exception.

then have a look in the debugger whether the error case could be handled earlier, e.g. inside the CharacterComponent class. for example, by checking whether a physics shape exists.

@dloe
Copy link
Contributor

dloe commented Aug 12, 2024

Hello! I was looking and I wasn't sure if this issue was being worked on. If not, I would love to give it a try, Thanks!

@Eideren
Copy link
Collaborator

Eideren commented Aug 12, 2024

Yep, it's free, please do !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Physics enhancement New feature or request good first issue Good for newcomers priority-Medium Important but not necessarily needed can be in release or not. work-estimate-S Good for first timers. A relatively quick item to fix, Max of 2x of XS
Projects
None yet
Development

No branches or pull requests

5 participants