[Request] Collision Filtering Support from Blender
3 posters
[Request] Collision Filtering Support from Blender
Bullet has built in support for collision with filtering the simplest and fastest being masks. It is a perfect fit for the iPhone to keep the performance at peak. If there was some way to specify the collision type and what it can collide with in Blender that would be superb. I am not sure what the best way to do this would be so I was hoping you had some ideas. Maybe something in the user variables that would make sense...
The only code change that would need is in sio2_physic.cc line 364. it would just need to pass 2 extra parameters to the Bullet addRigidBody method:
to:
The only code change that would need is in sio2_physic.cc line 364. it would just need to pass 2 extra parameters to the Bullet addRigidBody method:
- Code:
// Current way
_SIO2physic->_btSoftRigidDynamicsWorld->addRigidBody( _SIO2object->_btRigidBody );
to:
- Code:
enum collisionTypes {
COL_NOTHING = 1<< 0, //Collide with nothing
COL_SHIP = 1<< 1, //Collide with ships
COL_WALL = 1<< 2, //Collide with walls
COL_POWERUP = 1<< 3 //Collide with powerups
}
int objectCollidesWith = COL_SHIP | COL_WALL;
_SIO2physic->_btSoftRigidDynamicsWorld->addRigidBody( _SIO2object->_btRigidBody,
COL_SHIP /* collsion type of this object */,
objectCollidesWith /* bitmask of collisionTypes that this object should collide with */ );
uprise78- Posts : 228
Join date : 2008-10-31
Re: [Request] Collision Filtering Support from Blender
+1
I have been looking at this as well as I had wanted filter collisions thru collisions masks...you approach is exactly the one I was envisioning. Would be great to have it natively implemented as part of SIO2...
Cheers
I have been looking at this as well as I had wanted filter collisions thru collisions masks...you approach is exactly the one I was envisioning. Would be great to have it natively implemented as part of SIO2...
Cheers
Francescu- Posts : 136
Join date : 2009-03-18
Re: [Request] Collision Filtering Support from Blender
Ok sounds like a good idea but what is the workflow that you envision to integrate that within blender?
Re: [Request] Collision Filtering Support from Blender
Let me poke around in Blender a bit to see what makes the most sense. It would be nice if everything could be done from withing Blender.
uprise78- Posts : 228
Join date : 2008-10-31
Re: [Request] Collision Filtering Support from Blender
I agree... but honestly at the moment I can't see where it can fit in...
Re: [Request] Collision Filtering Support from Blender
How 2 about user variables in Blender.
CollisionObjectType - This could be an integer that can pretty easily be mapped to a bitmask to be sent off to Bullet
ObjectCollidesWith - comma delimited list of integers that correspond to CollisionObjectTypes. On parsing, they can be added to the bitmask that gets sent to Blender.
I cant see any Blender built in controls that would work for this so user variables seem like the way to go. It would be pretty trivial to add the two variables for any objects that you want to be included with the collision masks.
CollisionObjectType - This could be an integer that can pretty easily be mapped to a bitmask to be sent off to Bullet
ObjectCollidesWith - comma delimited list of integers that correspond to CollisionObjectTypes. On parsing, they can be added to the bitmask that gets sent to Blender.
I cant see any Blender built in controls that would work for this so user variables seem like the way to go. It would be pretty trivial to add the two variables for any objects that you want to be included with the collision masks.
uprise78- Posts : 228
Join date : 2008-10-31
Similar topics
» REQUEST: Lua to Python
» terrain collision with blender 249.2
» Request to Remove Blender Exports Options
» a problem with blender, when i run the blender on leopard prompt "not enough VRAM"
» .PNG support
» terrain collision with blender 249.2
» Request to Remove Blender Exports Options
» a problem with blender, when i run the blender on leopard prompt "not enough VRAM"
» .PNG support
Permissions in this forum:
You cannot reply to topics in this forum
|
|