Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 877 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Simple Collision Question... #70762
04/13/06 08:05
04/13/06 08:05
Joined: Apr 2006
Posts: 36
P
pwy Offline OP
Newbie
pwy  Offline OP
Newbie
P

Joined: Apr 2006
Posts: 36
How do you detect that a collision has happened?
Thanks in advance.

Re: Simple Collision Question... [Re: pwy] #70763
04/13/06 12:48
04/13/06 12:48
Joined: Mar 2006
Posts: 155
3MWe Offline
Member
3MWe  Offline
Member

Joined: Mar 2006
Posts: 155
simply watch out


THAT S FUNNY: http://log.thedom.de/images/000508-1.jpg if you don't speak german: Hein = Name mit = with Kartoffeln = Potatos seinen Kumpels = his homies
Re: Simple Collision Question... [Re: pwy] #70764
04/15/06 07:35
04/15/06 07:35
Joined: Apr 2006
Posts: 36
P
pwy Offline OP
Newbie
pwy  Offline OP
Newbie
P

Joined: Apr 2006
Posts: 36
ha ha. serisously though.

i need to know how to do the following:
if ( collided with something ){
do something...
}

I'm almost sure I need to use "c_trace". But I'm a little ( or a lot ) confused about how it works.

I've only had Gamestudio for like a week. I'm learning the syntax still.
could use the help.

Re: Simple Collision Question... [Re: pwy] #70765
04/15/06 08:49
04/15/06 08:49
Joined: Jan 2005
Posts: 267
the Netherlands
Paulo Offline
Member
Paulo  Offline
Member

Joined: Jan 2005
Posts: 267
the Netherlands
depents on the collision.

for instance a collision with a block

function bounce_event
{
if (EVENT_TYPE == Event_impact)
{
... // do what you want.
}
}

action bounceball
{
...
my.enable_impact = ON; // sensible for impact
my.EVENT = bounce_event;
...
}

hope this is what you mean, check the help file in the SED and type enable, you'll find al sorts of collision detections.


The more you have.. the more you can lose...
Dont tell em all you know.....
Re: Simple Collision Question... [Re: Paulo] #70766
04/15/06 16:53
04/15/06 16:53
Joined: Apr 2006
Posts: 36
P
pwy Offline OP
Newbie
pwy  Offline OP
Newbie
P

Joined: Apr 2006
Posts: 36
Cool Paulo. I'll give it a look and see what happens.

Also, I'm wondering about "event_impact" vs. "event_block".
I can't seem to get "event_block" to work. Is this because
"event_block" is no longer used or something?

Take care--and thanks for the help!

Re: Simple Collision Question... [Re: pwy] #70767
04/15/06 17:19
04/15/06 17:19
Joined: Apr 2006
Posts: 36
P
pwy Offline OP
Newbie
pwy  Offline OP
Newbie
P

Joined: Apr 2006
Posts: 36
Never mind. Got it to work!
Just some simple trial and error.


Thanks again.

Re: Simple Collision Question... [Re: pwy] #70768
08/13/06 05:24
08/13/06 05:24
Joined: Dec 2005
Posts: 11
Wisconsin
TKN Offline
Newbie
TKN  Offline
Newbie

Joined: Dec 2005
Posts: 11
Wisconsin
Actually I would appreciate it if you could explain the difference between event_impact/event_entity and event_block.

Re: Simple Collision Question... [Re: TKN] #70769
08/13/06 05:47
08/13/06 05:47
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
event_impact
-- when an entity is hit by ANOTHER entity moving under ent_move c_move or c_rotate

event_entity
-- when an entity moving with ent_move c_mvoe c_rotate imapacts with another entity

event_block
-- when an entity moving by ent_move or c_move or c_rotate collids with a level geometry surface ( block)

Re: Simple Collision Question... [Re: Grimber] #70770
08/13/06 06:51
08/13/06 06:51
Joined: Jun 2006
Posts: 86
Asia
xboy360 Offline
Junior Member
xboy360  Offline
Junior Member

Joined: Jun 2006
Posts: 86
Asia
OK. Question:

I used models for my road/curb. WHen my car collides with the curb, it just goes through. How can i use per polygon collision with models? i know its my.polygon = on but thats for physics enabled entites, right?
i only have A6 standard.


Happy Birthday!
Re: Simple Collision Question... [Re: xboy360] #70771
08/13/06 10:49
08/13/06 10:49
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
moving entities can't use the poly collision, only static models, like your curbs and road. so your cannot set my.polygon=on for any moving entity that has to have collision detection.

your car model using c_move and c_rotate uses an elipsoide collision hull
(The older ent_move used a box hull but with no rotation collision detection)
if you scale your car it may need to have its collision hull reset
( c_setminmax() )

Page 1 of 2 1 2

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