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.

Dark Physics & Dark A.I. & Dark Dynamix / Character sticking to walls

Author
Message
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 9th Jun 2008 17:35
I'm working on a platform game with DarkPhysics, and I'm having a lot of problems. Two big ones I need to fix:

First, my character sticks to the walls. If I jump down a mineshaft, if he touches one of the walls he'll just stick to it and not continue falling.

Second, Box2D had a useful command called B2 ENABLE BODY ROTATION, to set a body so that it couldn't rotate. This is what I need for my character here, so he won't fall over when he moves or jumps. I've tried just setting the angular velocity and momentum to 0 each loop, but it some cases he'll still tip over.

Anybody know what might fix these problems?

Los Mineros are back in progress!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Jun 2008 17:42
for the second problem, moving the local mass so that its in the Character boots instead of its middle.

are the mineshaft walls dynamic or static.

Dark Physics makes any hot drink go cold.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 10th Jun 2008 02:09 Edited at: 10th Jun 2008 02:14
They're static cubes. Thanks for your solution, I'll try it out.

Edit: Yes, that helped a lot! Thanks! However, the character can still tip over when, for example, he is placed more than halfway over the edge of a platform. Any other suggestions? I suppose it's workable now, though, because he no longer falls over while running.

Los Mineros are back in progress!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Jun 2008 11:32
I supposes it looks like you are now having to make an engine that detect when your character is 2/3 over the edge then it will fall or you shift the mass to opposite side to where the edge of the object is.

Quote: "They're static cubes."

it sound like you might need to use PHY SET RIGID BODY CCD MOTION THRESHOLD , this is a demo made by mike.


Dark Physics makes any hot drink go cold.
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 11th Jun 2008 00:13 Edited at: 11th Jun 2008 00:15
HowDo just tested that code snippet, that work quite good.

I see that your hunt for dp code is jumping leaps and bounds, no help file with it though, what are the values that PHY SET RIGID BODY CCD MOTION THRESHOLD use?

do you think that would work well for bullets?
I could use it with the new collision commands to delete the bullet once its hit, it would have a grater punch to the bullet.

what do you all think?

soul sucking devils, twisted body of the damed, slivering slim drips from ever poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!....
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 11th Jun 2008 02:38
The CCD snippet does indeed work, unfortunately, it didn't solve my problem. The character still sticks just as much as ever . Thanks, though.

I wonder if PHY SET RIGID BODY CCD MOTION THRESHOLD would help? I've been having problems with it like sindore, what kind of value does it need?

Oh, and I finally solved my problem with the character tipping over, discovered the nifty command PHY SET RIGID BODY ROTATION.

Los Mineros are back in progress!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 11th Jun 2008 14:39
@sindore

Don't know if help file for that command is in the help file of the ide or in the chm files as I have been adding and updating my ide files to match the command and making them turn blue.
hint
if a help file in the old ide comes back with file not found its could be a spelling diffrent or its a chm file.

@bmaczero

Nice find there, now your the master on how to stop your object from falling over.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-11-24 23:30:57
Your offset time is: 2024-11-24 23:30:57