Raydium 3D Game Engine
http://memak.raydium.org/

Collision detect
http://memak.raydium.org/viewtopic.php?f=8&t=913
Page 1 of 1

Author:  Farabi [ Tue Nov 25, 2008 9:29 am ]
Post subject:  Collision detect

How to detect collision between object?

Author:  ouille [ Tue Nov 25, 2008 11:43 am ]
Post subject:  Re: Collision detect

Hello,

Look at test6.c for example.

Define a collide callback:
Code:
raydium_ode_CollideCallback=collide;


And do whatever you need in this call back.

Have a nice day.
Ouille

Author:  Farabi [ Thu Nov 27, 2008 9:14 am ]
Post subject:  Re: Collision detect

How to get the object name that collided from the parameter passed to the Callback function?

Author:  ouille [ Thu Nov 27, 2008 12:07 pm ]
Post subject:  Re: Collision detect

Hello,

all ode elements are stored in an array: raydium_ode_element[]

so

raydium_ode_element[e1].name will give you the name of e1 element.

e1 and thus e2 are parameter of collide function.

Have a nice day.
Ouille

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/