Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/23/26 10:49
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (MonsterX, Martin_HH, TipmyPip), 6,282 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 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