Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, degenerate_762, ozgur), 1,311 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
problem with ent_getvertex compared to vec_to_uv #430600
09/29/13 15:33
09/29/13 15:33
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Hi,
In my DK like ImpAI demo i do the UV setup dynamically to change textures. I tried to change from the current vec_to_uv method to ent_getvertex/ent_setvertex

however, this produces a completely wrong setup(visually destroyed).

Thats what i did before:
Code:
VECTOR LVec;
	CONTACT LC;
	LVec.x = AX*textile_size + textile_correction;
	LVec.y = (AY+1)*textile_size - textile_correction;
	vec_to_uv(LVec, AEnt, VertA);



and thats what i do now:
Code:
VECTOR LVec;
	CONTACT LC;
	LVec.x = AX*textile_size + textile_correction;
	LVec.y = (AY+1)*textile_size - textile_correction;
	ent_getvertex(AEnt, &LC, VertA);
	LC.v.u1 = LVec.x;
	LC.v.v1 = LVec.y;
	ent_setvertex(AEnt, &LC, VertA);



it does not matter if i use LC.u1 or LC.v.u1. In both cases, messed up frown

I have a method which modifies 4 vertices in a row(given VertA, VertB, VertC, VertD index numbers).

My function used vec_to_uv 4 times, now it uses the new method described above for the first vertex and the last 3 times still use the old method.(i changed the first and keept the last 3 to compare)

Can someone help me?

Greetings
Rackscha


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: problem with ent_getvertex compared to vec_to_uv [Re: Rackscha] #430662
09/30/13 17:04
09/30/13 17:04
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Okayy i got it:

The problem was using vec_to_uv and ent_setvertex within the same frame.
Removed all remaining vec_to_uv and replaced it with ent_get/setvertex.

Now everything works fine


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


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

Gamestudio download | chip programmers | 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