Gamestudio Links
Zorro Links
Newest Posts
nba2king Latest Roster Update Breakdown
by joenxxx. 10/14/25 06:06
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Grant, joenxxx), 9,921 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Unanswered questions #380471
08/18/11 07:27
08/18/11 07:27
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
As no one seems to know the answers, I've decided to ask them here:

"TEX_COLOR" - I used view entities for weapons, and I used to change they color depending on the textures color under players feet.
I was simply tracing under player's feet with SCAN_TEXTURE and then setting entitie's "blue" to "tex_color", but now it doesn't work.
I tried "tex_light" as some one recommended me, but that doesn't work as well, plus "tex_color" works under C-SCRIPT but not with LITE-C.

"PH_CONVEX" - this doesn't work for me... It's different to "PH_POLY" (which has proper hull), convex works like this for me:

I would like to know, what am I probably doing wrong? Model is simply, and it's count isn't more than 256 p.

"PH_HINGE" - I've started learning constants, and it's seems pretty simple, but I found out that I can't understand something...
Code:
action obj_motor() 
{
	VECTOR temp;
	set(my,POLYGON|SHADOW);
	pXent_settype(my,1,PH_CONVEX);
	pXent_setmass(my,0.05);
	pXent_setfriction(my,0);
	pXent_setiterations(my,15);
	pXent_setdamping(my,100,100); 
	pXent_setskinwidth(my,0);
	pXent_setelasticity(my,25);
	pXcon_add(PH_HINGE,my,NULL,0);
	pXcon_setparams1(my,NULL,vector(0,1,0),nullvector);
	pXcon_setparams2(my,vector(-360,360,0),NULL,NULL);	
	while(1)
	{
		temp.x = temp.z = 0;
		temp.y = 100 * time_step;
		pXent_setangvelocity(my,temp);
		wait(1);
	}
}

I've set no limit's for joint, and I rotate it in it's TILT, plus I apply velocity, so it should turn clock wise, and it works.
But it turns only about 2 times, and then stops.. Didn't I set full limit at hinge? Or what am I doing wrong? Thanks.



Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Unanswered questions [Re: 3run] #380479
08/18/11 08:14
08/18/11 08:14
Joined: Jul 2000
Posts: 28,028
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,028
Frankfurt
For detecting texture colors under the player, look for "c_trace" and "hit" in the manual. TEX_COLOR can not be used for that.

The collision behavior you're getting with PH_CONVEX could be caused by a too-big hull of the other entity, or a skin width setting too large for the scale of your objects. At least that's the 2 things I'd suspect at first.

As to the hinge problem, does it stop suddenly after 2 turns, or does the movement slowly cme to a standstill?

Re: Unanswered questions [Re: jcl] #380489
08/18/11 09:07
08/18/11 09:07
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I'll take a look at "hit", thanks. But I would like to know, "tex_color" doesn't work with lite-c for that purpose, right?

The action is the same as for the hinge, which I try to move, but without applying velocity, it's looks like this:
Code:
action obj_motor() 
{
	VECTOR temp;
	set(my,POLYGON|SHADOW);
	pXent_settype(my,PH_RIGID,PH_CONVEX);
	pXent_setmass(my,0.05);
	pXent_setfriction(my,0);
	pXent_setiterations(my,15);
	pXent_setdamping(my,100,100); 
	pXent_setskinwidth(my,0);
	pXent_setelasticity(my,25);
}

As you see, skin width is "0"... Didn't get about too-big hull, could you explain?
Plus, it works perfect with all other models if I make it static with PH_POLY.
Here is the same problem with different models:


About stopping hinge, as I placed model at the level, it has -15 tilt, then when I debugged it's tilt, I see that it was decreasing till -90 and then increasing to -0.002 and at this position it stops. I was wrong about 2 turns, it makes only half way. And it stops at the same angle always, I have no idea why.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Unanswered questions [Re: 3run] #380523
08/18/11 16:43
08/18/11 16:43
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I got an answer for problem with convex, rojart says that it's like this:

Others problems still exist.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Unanswered questions [Re: 3run] #380531
08/18/11 19:15
08/18/11 19:15
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
@3Run your picture reminds me of my old Physics multiplayer demo when i used green for sending and red for nonsending objects^^


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Unanswered questions [Re: Rackscha] #380537
08/18/11 20:22
08/18/11 20:22
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
What project is that? Any videos, pictures, source? tongue


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Unanswered questions [Re: 3run] #380541
08/18/11 21:16
08/18/11 21:16
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
you even visited it^^

edit: oh and with Physics i dont mean physix

Link

Last edited by Rackscha; 08/18/11 21:17.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Unanswered questions [Re: Rackscha] #380552
08/19/11 01:19
08/19/11 01:19
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Thank you 4 the link, now I remembered it.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Unanswered questions [Re: 3run] #380769
08/21/11 12:37
08/21/11 12:37
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
"hit" works but it doesn't detect dynamic lights, but "tex_color" used to detect them in C-SCRIPT. How do I get it to work with LITE-C?

And what about HINGE why does it stop? Or is there anything wrong in my script? Thank you in advices.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Unanswered questions [Re: 3run] #380869
08/22/11 09:12
08/22/11 09:12
Joined: Jul 2000
Posts: 28,028
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,028
Frankfurt
To detect dynamic lights, there are several functions - look for ent_nextlight or view_to_light. TEX_COLOR was an old A6 variable for storing the shadowmap, and was long ago replaced by CONTACT. It had nothing to do with detecting dynamic lights.

As to the stopping of the hinge, does this only happen with the tilt, or also with the pan angle?

Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1