Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by mistery. 12/05/26 12:48
contractUpdate() is filtering if >2 rows
by mistery. 12/04/26 19:03
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Grant), 2,494 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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 | 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