Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (AndrewAMD, Grant, valino), 3,361 guests, and 13 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Skin auf dem Entitie verschieben #218109
07/26/08 14:10
07/26/08 14:10
Joined: Oct 2005
Posts: 612
Inari Offline OP
User
Inari  Offline OP
User

Joined: Oct 2005
Posts: 612
Hi, kennt jemand die Zeilen mit der man das Skin auf einem
Entitie hin und her verschieben kann?

schon mal Danke, Inari

Re: Skin auf dem Entitie verschieben [Re: Inari] #218118
07/26/08 14:58
07/26/08 14:58
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221
Hallo,

in der mtlFX.wdl (/template_6/code) bzw. mtlFX.c (/code) gibt es einen Fixed Function Effect dafür:

Code:
function mtl_uvspeed_render()
{
// using the material matrix:
// u' = u * mtl.matrix11 + v * mtl.matrix21 + mtl.matrix31;
// v' = u * mtl.matrix12 + v * mtl.matrix22 + mtl.matrix32;
	mtl.matrix31 = floatd(my.skill1*total_ticks,256);
	mtl.matrix32 = floatd(my.skill2*total_ticks,256);
}

function mtl_uvspeed_init()
{
// copy standard model material properties
	mtl_copy(mat_model);
	mat_identity(mtl.matrix);
	mtl.event = mtl_uvspeed_render;
	mtl.ENABLE_RENDER = on;
}

MATERIAL mtl_uvspeed
{
	event = mtl_uvspeed_init;
	effect = "
	matrix matMtl;

	technique uvspeed
	{
		pass one
		{
			TextureTransformFlags[0] = Count2;
			TextureTransform[0] = <matMtl>;
		}
	}
	technique fallback { pass one { } }
	";
}

//action: fx_uvspeed
//title: Texture shifting in u and v direction
//
//skill1: Speed_U 0
//help: Texture Speed in U direction, default 0
//skill2: Speed_V -2
//help: Texture Speed in V direction, default -2
//desc: 
//desc: Shifts a texture in u and v direction.
//desc: To be assigned to a model. 
//
action fx_uvspeed()
{
	my.material = mtl_uvspeed;
	if (0 == my.skill1 && 0 == my.skill2) { my.skill2 = -2; }
}


Re: Skin auf dem Entitie verschieben [Re: Fenriswolf] #218629
07/29/08 15:30
07/29/08 15:30
Joined: Apr 2007
Posts: 582
Germany
Poison Offline
User
Poison  Offline
User

Joined: Apr 2007
Posts: 582
Germany
verwende einfach u und v dafür

BSP:

my.u += 5 * time_step;
selbiges bei v


Everything is possible, just Do it!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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