Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Thu Mar 28, 2024 4:05 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Collision detect
PostPosted: Tue Nov 25, 2008 9:29 am 
Offline

Joined: Sat Nov 22, 2008 6:33 am
Posts: 68
How to detect collision between object?


Top
 Profile  
 
 Post subject: Re: Collision detect
PostPosted: Tue Nov 25, 2008 11:43 am 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
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


Top
 Profile  
 
 Post subject: Re: Collision detect
PostPosted: Thu Nov 27, 2008 9:14 am 
Offline

Joined: Sat Nov 22, 2008 6:33 am
Posts: 68
How to get the object name that collided from the parameter passed to the Callback function?


Top
 Profile  
 
 Post subject: Re: Collision detect
PostPosted: Thu Nov 27, 2008 12:07 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group