Strange thing

Posted By: snake67

Strange thing - 01/23/11 05:20

Hi

I am porting all my stuff to A8 and A8 PhysX (instead of ODE). Its not that easy as mentioned in the update notes i think. The documentation of the PhysX system in the manual seems to be a bit rudimentary too. Nevertheless most works fine now.

Whats still a miracle to me, is the trigger system. When activated, objects fall through the floor. Unless they are set to PH_STATIC. Did someone encounter similar problems?
Posted By: Superku

Re: Strange thing - 01/23/11 06:14

What do you mean with "trigger system activated" ?
Posted By: rojart

Re: Strange thing - 01/23/11 08:32

Originally Posted By: snake67
When activated, objects fall through the floor. Did someone encounter similar problems?

I had a similar problem and I solved it by adding to the entity that function pXent_setccdskeleton, but I had reduced the scale vector to: (0.25,0.25,0.25)

Originally Posted By: Superku
What do you mean with "trigger system activated" ?

I also wonder what kind of system you meant?
Posted By: snake67

Re: Strange thing - 01/23/11 08:49

Thanks. Ok, i mean the PhysX event function like this:

Code:
void weapon_pickup_physics()
{
	if(you!=player) return;
	my.event=NULL;
	if(!weapon_give_player())
	{
		wait(-1);
		my.event=weapon_pickup_physics;
		return;
	}
	pXent_settype(me, 0, PH_BOX);
	wait(1);
	ent_remove(me);
}

//uses _type, _mags, _silent
action weapon_physics()
{
        ...
	
	pXent_settype(me, PH_STATIC, PH_BOX);
	pXent_settriggerflag(me, NX_TRIGGER_ON_ENTER, 1);
	my.emask=ENABLE_TRIGGER;
	my.trigger_range=80;
	my.event=weapon_pickup_physics;
}


Posted By: snake67

Re: Strange thing - 01/25/11 03:59

Hi there. Thanks, but its not solved yet. I still have the same problem. Here is the code:

Code:
void main()
{
	physX_open();
	pX_setgravity(vector(0, 0, -9.81));
	pX_setccd(1);
	level_load("...");
}

action physics_object()
{
	pXent_settype(me, PH_RIGID, PH_BOX);
	pXent_setccdskeleton(me, vector(0.2, 0.2, 0.2), 1);
	pXent_settriggerflag(me, NX_TRIGGER_ON_ENTER, 1);
}



I am certanly making a simple mistake... Does someone have any suggestions? (Thanks)
Posted By: TerraSame

Re: Strange thing - 01/25/11 06:17

I suppose this may help...
I and others have had the problem of falling through the floor/terrain when we
up-graded to the A8 PhysX system... There is a major issue with the new system
where everything falls through terrains if your scale of your terrain is altered in wed.
In other words you might need to scale your terrain in med so that when you
locate it in wed it has a scale of one... This has caught a lot of us off guard...
Its just a shot in the dark... but... I hope that helps and solves the issue...
Posted By: snake67

Re: Strange thing - 01/25/11 16:35

Thanks. But i am not using terrain, i have a block level compiled with the option "Build Simple Map".
Posted By: Superku

Re: Strange thing - 01/25/11 17:06

You could use pXent_setcollisionflag, that works.
Otherwise you can file a bug report, of course.
Posted By: rojart

Re: Strange thing - 01/25/11 17:55

Originally Posted By: snake67
Thanks. But i am not using terrain, i have a block level compiled with the option "Build Simple Map".

Try to use that code, after your level map is loaded, maybe it helps.

Code:
...
physX_open();
pX_setccd ( 1 );
level_load("mylevel.wmb");
pXent_settype(level_ent,PH_STATIC,PH_POLY|PH_MODIFIED);
...


Posted By: snake67

Re: Strange thing - 01/25/11 18:06

Thanks. I inserted the line after level_load, but it changed nothing.
© 2024 lite-C Forums