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, 7th_zorro, TedMar), 1,243 guests, and 4 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
get_hitvertex #146026
08/05/07 19:51
08/05/07 19:51
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
hallo i have a problem white this code

it trace but i dont get the vertex
fisrt time i try this function because i am going to use thise white vec_to_mesh so i realy need that vertex_search
i tried to set vec_set and more but getvertex stays -1 watever i tryed
sombody a idee thx

var getvertex;

while(1)
{
c_trace(my.x,vector(my.x,my.y,my.z-100),use_box && get_hitvertex);
getvertex = hitvertex;
wait(1);
}


"empty"
Re: get_hitvertex [Re: flits] #146027
08/05/07 20:18
08/05/07 20:18
Joined: Aug 2003
Posts: 169
Tennessee, US
Ahriman Offline
Member
Ahriman  Offline
Member

Joined: Aug 2003
Posts: 169
Tennessee, US
Try using Ignore_me in the trace, it is possible depending on the models center that you are tracing the wrong model. Also you are using use_box...from the manual:

GET_HITVERTEX When a model is hit, the number of the hit vertex will be returned in the hitvertex variable. Mutually exclusive with USE_AABB.

var getvertex;

while(1)
{
c_trace(my.x,vector(my.x,my.y,my.z-100), ignore_me|use_aabb|get_hitvertex );
getvertex = hitvertex;
wait(1);
}

Re: get_hitvertex [Re: Ahriman] #146028
08/05/07 20:24
08/05/07 20:24
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
thx but it didnt work it stays -1


more infi from manaul >><<

c_trace(VECTOR* from, VECTOR* to, var mode)
Sends a ray from the from position to the to position and checks whether this ray hits an obstacle on its way. This is the general instruction that is used by entities to detect their environment.
Parameters:
from Start position vector
to Target position vector
mode Tracing mode, see below

The following mode flags can be combined:
GET_HITVERTEX When a model is hit, the number of the hit vertex will be returned in the hitvertex variable. Mutually exclusive with USE_AABB.

Modifies:
hitvertex The hit object's closest vertex number, when mode is set to GET_HITVERTEX.


"empty"
Re: get_hitvertex [Re: flits] #146029
08/05/07 20:38
08/05/07 20:38
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Quote:

Mutually exclusive with USE_AABB




Doesn´t that mean that use_aabb doesn´t work together with get_hitvertex?
What happens if you delete "use_aabb"?


no science involved
Re: get_hitvertex [Re: fogman] #146030
08/05/07 20:45
08/05/07 20:45
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
thx i tried somthing else

from

c_trace(my.x,vector(my.x,my.y,my.z-100),use_box && get_hitvertex);
to
c_trace(my.x,vector(my.x,my.y,(my.z-100)),ignore_me | get_hitvertex);

now it works
i think its the use_box
it wasnt ignore_me
thx all


"empty"

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