Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (bdgogo), 1,447 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
collision detection without MOVE #12145
03/20/03 08:41
03/20/03 08:41

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



dear everyone,

how to check collision without using move().
I just want to set the my.x and my.y value to change the position of the object, and I want to check collision to.
enable_impact can be used if move() is used. so how to to do??

ThanX in advance

Re: collision detection without MOVE #12146
03/20/03 10:27
03/20/03 10:27

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I don't think you will be able to do anything about enable_impact, but you can calculate how far you are trying to move in some direction, (just like you would for move()) copy the absolute coordinates of the destination to some temporary vector (destination.x is how far to move + your current position), and perform a trace() from your position to the destination vector. This should provide basic effects of collision detection.

Re: collision detection without MOVE #12147
03/20/03 14:35
03/20/03 14:35
Joined: Apr 2002
Posts: 731
Schweiz-Bern
Adi Offline
Developer
Adi  Offline
Developer

Joined: Apr 2002
Posts: 731
Schweiz-Bern
Hi

Don't use my.x and my.y values to change the position of your object. Use ent_move like so:

code:
var dist[3];
function move_obect
{
while (1)
{
dist.x = 10 * key_force.x; //controll with cursor key
dist.y = 10 * key_force.y; //controll with cursor key
dist.z = 0;
move_mode = ignore_passable + glide;
ent_move(dist, nullvector);
wait(1);
}
}

This is a part of wdlman.pdf you've got it.


************************************************************
Fantasie ist nicht die Flucht aus dem wahren Leben sondern die Erholung davon.
Imagination is not an escape from the real life. It's a relaxation.

Moderated by  HeelX, Spirit 

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