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
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
pathetic terrain trace reliability #114851
03/03/07 13:05
03/03/07 13:05
Joined: Aug 2006
Posts: 128
Papua New Guinea
I
Impaler Offline OP
Member
Impaler  Offline OP
Member
I

Joined: Aug 2006
Posts: 128
Papua New Guinea
Hi,
I have just tried using terrain in a game level, and previously I had only used blocks. Anyway, there are a bunch of problems with is. one is that tracing from a bullet in front of it to detect where it hits things doesn't work. Here's the basic script:

my.x += 300 * cos(my.pan) * time;
my.y += 300 * sin(my.pan) * time;
my.z += 300 * tan(my.tilt) * time;

trace_mode = ignore_me;
trace(my.x, vector(my.x + 300 * cos(my.pan), my.y + 300 * sin(my.pan), etc... ;
if(trace(my.x, vector(my.x + 300 * cos(my.pan), my.y + 300 * sin(my.pan), my.z + 300 * tan(my.tilt) <300)
{
my.x = target.x; // and all this makes the bullet actually hit the surface.
my.y = target.y;
my.z = target.z;
}

but this only works some of the time with terrain, but with blocks it works 100% of the time. Sometimes it just goes straight through the terrain. What's happeneing?


Murphey's Law:
<< if anything can go wrong, it will >>

(Murphey was an optimist).
Re: pathetic terrain trace reliability [Re: Impaler] #114852
03/03/07 13:10
03/03/07 13:10

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Use my.enable_block = on; and my.enable_entity = on; and attach it to you bullet entity
then
function bullet_event
{
if(event_type = event_entity)
{
...
}
and so on

sry for my bad english

Re: pathetic terrain trace reliability [Re: ] #114853
03/03/07 13:14
03/03/07 13:14
Joined: Aug 2006
Posts: 128
Papua New Guinea
I
Impaler Offline OP
Member
Impaler  Offline OP
Member
I

Joined: Aug 2006
Posts: 128
Papua New Guinea
Wow, you replied really quickly(so quickly that I didn't even have time to tell everyone to ignore this posting because I put it in the wrong place!!!) Sorry everyone!. Oh, and I tried that using the built in collision detection thing but it doesn't work well with bullets . Thanks anyway.


Murphey's Law:
<< if anything can go wrong, it will >>

(Murphey was an optimist).
Re: pathetic terrain trace reliability [Re: Impaler] #114854
03/03/07 20:47
03/03/07 20:47
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Moved Here


xXxGuitar511
- Programmer
Re: pathetic terrain trace reliability [Re: xXxGuitar511] #114855
03/04/07 07:41
03/04/07 07:41
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
use ctrace, not trace.


Sphere Engine--the premier A6 graphics plugin.

Moderated by  HeelX, rvL_eXile 

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