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.

DarkBASIC Professional Discussion / A couple of newton problems, please help

Author
Message
headcrab 53
20
Years of Service
User Offline
Joined: 14th Jul 2005
Location:
Posted: 19th Dec 2006 22:51 Edited at: 19th Dec 2006 22:59
PROBLEM NUMBER 1:

In the game, everything except the player either slowly sinks through the floor, or moves very strangely. In the level editor, everything is fine, and they both use the same code to load and position the objects!



PROBLEM NUMBER 2:

The game crashes whenever I try to use a shader on each of these objects. I tried making a second object that wasn't controlled by Newton, positioning it in the same spot as the Newton object and using a shader on it, but that didn't work. The shader worked when no objects were controlled by Newton, however. (I've attached a picture showing the error.)

EDIT:
I fixed Problem 2 . I loaded fewer objects and it worked fine. I'll load as many as I can and then load the rest part way through the level. Newton and the shaders (pixel lighting shader) probably conflict somehow with that many being used (About 390 - 400 objects all with shaders and physics). But I haven't figured out Problem 1 yet.

tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 20th Dec 2006 06:22
Are you setting up the Inertial Mass of the object? Not doing it, or doing it incorrectly (with some values having a zero) will cause the object to first collide with something and then slowly sink into it.

This:


should probably be like this:


Try that out and see if it helps.

I'm not a real programmer but I play one with DBPro!
headcrab 53
20
Years of Service
User Offline
Joined: 14th Jul 2005
Location:
Posted: 20th Dec 2006 17:31
YES! That worked perfectly!
Thank you!
Thank you!
Thank you!

tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 20th Dec 2006 17:51
You can thank the week-long struggle I had two months ago trying to figure out the same thing. Glad it helped two people now, it's almost worth it. LOL.

I'm not a real programmer but I play one with DBPro!

Login to post a reply

Server time is: 2026-06-10 03:26:28
Your offset time is: 2026-06-10 03:26:28