Page 1 of 1

Geometry Floating issue

Posted: Mon Dec 10, 2012 10:10 pm
by Dloomb
Hey,

Attached is a video of something I am working on for a University project. I am trying to get destructible geometry due to an explosion and I am getting close to achieving this. The only problem is that every now and then geometry just starts to float around as if in a zero g environment.
Any hints on what might be causing this?

https://www.youtube.com/watch?v=_o7fKQh ... e=youtu.be
At about 30 secs a yellow brick starts to float

-Daniel

Re: Geometry Floating issue

Posted: Mon Dec 10, 2012 10:13 pm
by Norbo
Is the entity.IsAffectedByGravity property being set to false?

Re: Geometry Floating issue

Posted: Mon Dec 10, 2012 10:47 pm
by Dloomb
I set the item held by the camera to false. which I have now taken out and it seems to have fixed it. I didn't realize it would transfer its lack of gravity to other objects. I have only tested it a bit but hopefully that has fixed it completely.

Thanks Norbo.

Re: Geometry Floating issue

Posted: Mon Dec 10, 2012 11:05 pm
by Norbo
I didn't realize it would transfer its lack of gravity to other objects.
IsAffectedByGravity does not 'infect' other shapes in any way. The entity with IsAffectedByGravity set to false will stay that way until set back to true; presumably the floating objects were set to false by earlier interactions.

Looking at the video, it appears all of the floating entities were at least near the grab rays. Perhaps the grabbing process erroneously set their IsAffectedByGravity to false when they were merely grab candidates which were then eliminated by closer inspection. If the flag was only ever cleared for objects that were actually grabbed, then these mere candidates would float for all eternity.

Re: Geometry Floating issue

Posted: Mon Dec 10, 2012 11:11 pm
by Dloomb
Ah, I see it now. I didn't put a break in the loop, so once it found the grab object it still carried on grabbing other objects and the one I ended up getting was just the last one to be tested. That's my bad.
Thanks again for your help.