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.

DLL Talk / Help needed: Newton and Collision - SetDefaultCollidable

Author
Message
Cel
17
Years of Service
User Offline
Joined: 6th Dec 2006
Location:
Posted: 6th Dec 2006 22:51
Hi all,

I'm having a little problem with detecting collision bewtween 2 materials and maybe you can help me?

I'm trying to build a kind of force field behavior that will let the player pass as long as he doesn't trigger some event. Once he triggers the event the force fields will be 'activated' not allowing the player to pass anymore. What I don't want is to create 2 different objects for the force field 'state' since I might want to use some more complex objects in the end. (Imagine a whole level where you can 'walk' through walls being a kind of ghost...)

Here's the code with comments:



Many thanks for your help in advance!

Cel.
Cel
17
Years of Service
User Offline
Joined: 6th Dec 2006
Location:
Posted: 7th Dec 2006 07:24
Just noticed that I didn't point you to the thing that is not working and since I cannot edit my post for some reason - here we go;

It seems that hit = NDB_GetCollisionBodyToMaterial(Player, Andere) never returns >0. Therefore the collision detection between Wall and Ball will never be activated. What did I do wrong?

Oh, and please disregard the first line of the code. Bad copy/paste...

Thanks!
Cel
17
Years of Service
User Offline
Joined: 6th Dec 2006
Location:
Posted: 7th Dec 2006 08:56
Yes, It's me again... Defragmenting my brain with a couple of beers helped. I finally found the problem.

I simply forgot to set NDB_NewtonMaterialSetCollisionCallback Ball,Andere! *sigh*

So please ignore this monologue thread.

Cel.

Login to post a reply

Server time is: 2024-11-26 02:12:25
Your offset time is: 2024-11-26 02:12:25