2 registered members (Akow, 1 invisible),
1,404
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Local co-ords to world co-ords
#237459
11/20/08 08:19
11/20/08 08:19
|
Joined: Jul 2008
Posts: 54 Taipei, Taiwan
PlaystationThree
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2008
Posts: 54
Taipei, Taiwan
|
As the title says, is there a function to convert a local position to a world position? Or the other way? I know you can do it with basic maths, but is there a script like local_to_world or something?
Bet you don't know where Taiwan is lol.
"The Lord is my light and my salvation..." Psm 27:1
|
|
|
Re: Local co-ords to world co-ords
[Re: heinekenbottle]
#239752
12/07/08 00:44
12/07/08 00:44
|
Joined: Jul 2008
Posts: 54 Taipei, Taiwan
PlaystationThree
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2008
Posts: 54
Taipei, Taiwan
|
yes but vec_to_mesh() uses local entity co-ords i.e. relative to itself. I'm trying to move an entity's vertex to world positions i.e. relative to world origin.
Bet you don't know where Taiwan is lol.
"The Lord is my light and my salvation..." Psm 27:1
|
|
|
Re: Local co-ords to world co-ords
[Re: PlaystationThree]
#239763
12/07/08 03:47
12/07/08 03:47
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Use this, as in vec_to_mesh(local_to_world(Targ_Ent.x, Worldpos_Target.x), Targ_Ent, Targ_Vert); VECTOR* local_to_world(VECTOR* Local, VECTOR* World)
{
VECTOR tempV;
vec_set(tempV.x, Local.x);
vec_add_tempV.x, World.x);
return(vector(tempV.x,tempV.y,tempV.z));
}
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Local co-ords to world co-ords
[Re: Tobias]
#239804
12/07/08 13:52
12/07/08 13:52
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
IF you are talking about mine, its still early yet...
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|