Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
0 registered members (), 1,012 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Other ways to check entity's collision #244726
01/06/09 14:03
01/06/09 14:03
Joined: Oct 2008
Posts: 6
Singapore
L
lps85 Offline OP
Newbie
lps85  Offline OP
Newbie
L

Joined: Oct 2008
Posts: 6
Singapore
Hi,

beside using c_move, c_rotate and other c functions, is there other ways to check whether the entity has collide with another entity or check whether an entity has overlap another one.

Thanks and appreciate all the helps

Re: Other ways to check entity's collision [Re: lps85] #244728
01/06/09 14:13
01/06/09 14:13
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
only if you program one by yourself



Ubi bene, ibi Patria.
Re: Other ways to check entity's collision [Re: lps85] #244744
01/06/09 15:24
01/06/09 15:24
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline
Member
yorisimo  Offline
Member
Y

Joined: Mar 2007
Posts: 197
you can use c_content to check whether a world position is in a solid (level block or walls) Thus, you can check if the vertices of your entity are within a solid. I've used this method before.

1. Move the entity
2. Check if the vertices are within a solid (using c_content)
3. If they are move the entity back, otherwise leave it where it is
4. use a wait command to allow the frame to be drawn.
5. If you need to check if the entity has hit another model you can create a wmb that matches the shape of your model and then move it with your entity.


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing
Re: Other ways to check entity's collision [Re: yorisimo] #244750
01/06/09 15:55
01/06/09 15:55
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
but he doesnt want to use and c_ functions and c_content is the c_ func smile



Ubi bene, ibi Patria.
Re: Other ways to check entity's collision [Re: croman] #244822
01/07/09 01:39
01/07/09 01:39
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
if you don't want to use c_ functions then the answer is ... no

though you can you use c_scan c_trace and c_content for scanning environments but without using movement, if that's what you're trying to not use

otherwise... no...

Re: Other ways to check entity's collision [Re: MrGuest] #244832
01/07/09 02:32
01/07/09 02:32
Joined: Oct 2008
Posts: 6
Singapore
L
lps85 Offline OP
Newbie
lps85  Offline OP
Newbie
L

Joined: Oct 2008
Posts: 6
Singapore
Thanks for all the replies.

The reason i did not want to use c_ functions is because i am creating a rts game and when the player want to construct a building, it needs to check whether the building collide with other entities in the world before it can place the building on that location where the mouse cursor is.

i might be wrong of thinking not to use any c_ functions but since the "unconstructed" building is following the mouse cursor, there might not be any chances to use any c_ functions

Re: Other ways to check entity's collision [Re: lps85] #244833
01/07/09 02:36
01/07/09 02:36
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Create an invisible building entity that follows the mouse by
using c_move from "where the house is now" to "where the mouse is now",
checking for collisions along the way.

Plausable?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Other ways to check entity's collision [Re: EvilSOB] #244857
01/07/09 08:38
01/07/09 08:38
Joined: Oct 2008
Posts: 6
Singapore
L
lps85 Offline OP
Newbie
lps85  Offline OP
Newbie
L

Joined: Oct 2008
Posts: 6
Singapore
Originally Posted By: EvilSOB
Create an invisible building entity that follows the mouse by
using c_move from "where the house is now" to "where the mouse is now",
checking for collisions along the way.

Plausable?


Thanks for your idea, EvilSOB but instead of using c_move, i have use c_rotate with the building when the player click at that particular position to see whether collision has occured while rotate and so far is working fine.

Thanks to all other who have giving me ideas. smile


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