Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Deleting / cancelling physics

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 28th Mar 2017 01:07
I'm not sure if there's something wrong with the 3D physics engine.
I've got a setup (can't really post the code though) which removes joints and physics bodies, but it either does nothing or crashes.

Is there a special way to "de-physics" a 3D obect other than Delete3DPhysicsBody(Obj) ?

The joints get deleted (no longer exist) but I get a "program no longer responding" error when resetting them and/or the objects stay in physics mode.

I know most people would want to see the example, but I was wondering if i'm doing something basic wrong (de-physicing)
Here's the snippet though:



Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 28th Mar 2017 13:41
The code looks correct. Have you tried running your code in debug mode?
The coffee is lovely dark and deep,and I have code to write before I sleep.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 29th Mar 2017 00:14
Interesting. I hadn't bothered setting the debugger up before.. it's quite good - be nice if you could get variable values by hovering over the code though...

I just noticed the joint check command GetJointExists() appears to be a 2D physics command and doesn't actually work in the above with 3D joints (always returns false).

If I keep track of the joint IDs like in the example below, it works but is messy. There isn't an invisible Get3DPhysicsJointExists() command either


damothegreat
User Banned
Posted: 29th Mar 2017 00:20
Coding error. We are pretty sure that Paul thought of everything in his development

If not, then its feature request

damothegreat
User Banned
Posted: 29th Mar 2017 00:23
We have to work with the commands provided, if we need to tweak the code to suit our needs, then its design fault and rethink the code.

Everything AppGameKit do (Paul) is.

CreateSprite.

Does exactly that....

This is behaviour by design issue by the one requesting the issue. Its not an issue, re design your code
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 29th Mar 2017 18:27
I'm assuming that this is some kind of attempt at sarcasm

Login to post a reply

Server time is: 2024-11-24 16:45:29
Your offset time is: 2024-11-24 16:45:29