Simple Collision Question...

Posted By: pwy

Simple Collision Question... - 04/13/06 08:05

How do you detect that a collision has happened?
Thanks in advance.
Posted By: 3MWe

Re: Simple Collision Question... - 04/13/06 12:48

simply watch out
Posted By: pwy

Re: Simple Collision Question... - 04/15/06 07:35

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.
Posted By: Paulo

Re: Simple Collision Question... - 04/15/06 08:49

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.
Posted By: pwy

Re: Simple Collision Question... - 04/15/06 16:53

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!
Posted By: pwy

Re: Simple Collision Question... - 04/15/06 17:19

Never mind. Got it to work!
Just some simple trial and error.


Thanks again.
Posted By: TKN

Re: Simple Collision Question... - 08/13/06 05:24

Actually I would appreciate it if you could explain the difference between event_impact/event_entity and event_block.
Posted By: Grimber

Re: Simple Collision Question... - 08/13/06 05:47

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)
Posted By: xboy360

Re: Simple Collision Question... - 08/13/06 06:51

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.
Posted By: Grimber

Re: Simple Collision Question... - 08/13/06 10:49

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() )
Posted By: xboy360

Re: Simple Collision Question... - 08/14/06 06:20

So i have to do this to make collision with the curb?
I used the action player_drive. Thank you.
© 2024 lite-C Forums