Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Tue Mar 19, 2024 3:47 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Jun 19, 2008 12:19 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
I create a dummy object like this
Code:
raydium_ode_object_box_add(name,raydium_sprite_collision_box_id[sid],1,raydium_sprite_collision_box[sid][0],raydium_sprite_collision_box[sid][1],raydium_sprite_collision_box[sid][2], RAYDIUM_ODE_STATIC,tag,"");

(Note the final "" where should be the mesh)

This object should collide even if it has no (graphical) mesh?
If i toogle to ODE debug mode i can see the bounding box of the object.
The fact is all the objects created in this way are not colliding.

update:
If I change the RAYDIUM_ODE_STATCIS for RAYDIUM_ODE_STANDARD then it works... What's wrong then? I can not use RAYDIUM_ODE_STANDARD for a few reason, so this workaround won't help me.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 19, 2008 1:30 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
The ODE guys have helped me a bit.
Quote:
I'm newbie. I want to create an object no affectec by forces (always moved manually) but that can be check if is touching/penetrating into another objects. Can that be done?
<vicentecarro> Or another focus. When 2 objects collide both receive forces in the oposite direction (sorry, I explain as I can ;) ). Can I disable those forces in a coliision? In that way the object could penetrate other objects.
<kpreid_> vicentecarro: yes
<vicentecarro> kpreid_, how?
<kpreid_> vicentecarro: all you have to do is, in your collision callback, if one of the objects is your special object, then don't create contact joints
<vicentecarro> ok...I'll try. I guess there is no example code of that, right?
<kpreid_> probably not
<kpreid_> but it really is that simple
<vicentecarro> ok, thanks you
<kpreid_> well, there's another approach
<vicentecarro> ...
<kpreid_> this might be useful depending on what you want to do:
<kpreid_> don't put the geom of the special object in the space the rest of your moving objects are
<kpreid_> but when you want to check it for collisions, use dSpaceCollide2 to collide it vs. everything-else
<kpreid_> this is good if you want to be able to choose to test just that object at some particular point in your code, independent of the regular simulation

Someone with ODE skills can help me to implement that?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 6:43 am 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

You can filter collide in the collide callback. Or with collide bit (your message).

If collide callback retrun 0, no collision and such forces are generated.

Code for balancier in maniadrive, kinghill, test6 do this in the right way.

Second part is more complex i think.

But effectively you can call collide with your object to get contact information in your callback. This avoid to call dcollide to often (as it's not needed) and just once for a frame.

You can also slow down physical to achieve same effect.

I'll try to get your code to have a look.

Have a nice day
Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 9:59 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Thanks, I't working! ;D


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 6 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:  
Powered by phpBB® Forum Software © phpBB Group