Page 8 of 8

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Sat Aug 14, 2010 3:05 am
by AndroidAdam
Sorry to rez an old thread, if that be the case, but I'm having a bit of a problem. MOC worked amazing for a single character, but I now have 40 entities each casting 4 rays (one in each of the cardinal directions) and this is causing quite a performance problem. I'm curious if there is a method of increasing the speed. Already I cache the MeshInformation so that it only has to be retrieved once, but nevertheless the game is unplayable.

Any suggestions would be greatly appreciated

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Sat Aug 14, 2010 10:17 am
by Nauk
I think you would be better off with using a real physics library in that case. Curious, how much speed gain did you get with the caching?

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Sun Aug 15, 2010 12:12 am
by RoadKillGrill
AndroidAdam wrote:Sorry to rez an old thread, if that be the case, but I'm having a bit of a problem. MOC worked amazing for a single character, but I now have 40 entities each casting 4 rays (one in each of the cardinal directions) and this is causing quite a performance problem. I'm curious if there is a method of increasing the speed. Already I cache the MeshInformation so that it only has to be retrieved once, but nevertheless the game is unplayable.

Any suggestions would be greatly appreciated
Instead on using cardinal directions use the heading of the object, that will still allow for good collision with half of the checks. Another thing to do is to disable queries with the current object, the is reduce 2 more checks per entity. For that matter made sure that it is only checking relevant objects that you indeed want collision with, if you don't want collision with it set its query flag. Also try to collide with simpler geometry, at this point seriously consider a real physics engine but it will help allot.

I started using MOC as a temporary solution but as the ppl I assigned to add physics failed it is the only system the High Contract: Zombie Game uses for collision. Even with many objects it is still rather playable on most systems tho I know that MOC is my bottleneck and I really should use a better system.

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Mon Sep 27, 2010 7:09 pm
by jonathan_blacknight
Sorry the stupid question, how about linux and animated meshes with tri mesh shape?

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Fri Oct 15, 2010 6:59 pm
by icaro56
Hi,

how I to do collision using a OBBoxRenderable ?
http://www.ogre3d.org/tikiwiki/Oriented ... e=Cookbook

OBBoxRenderable is not a mesh and in the MOC the collision test is done witch mesh. Is it simple change the MOC 's code to work with OBBoxRenderable?

thanks.

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Wed Dec 08, 2010 11:42 pm
by gameengineer
I noticed the sample that comes with MOC is camera to world collisions. Will this library handle one object Entity with other static things like walls?

I just need simple kinematic entity collisions against walls. The walls are made up of blocks or cubes placed around the scene. Full blown physics like OgreBullet and NxOgre are overkill for me. Just want collisions so the player mesh and their bullets doesn't go through walls.

Steve

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Wed Dec 08, 2010 11:57 pm
by RoadKillGrill
gameengineer wrote: Just want collisions so the player mesh and their bullets doesn't go through walls.
It will do that no problem and be very easy, that is what my game uses until I get off my lazy ass and add something better.

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Thu Dec 09, 2010 1:21 am
by gameengineer
It will do that no problem and be very easy, that is what my game uses until I get off my lazy ass and add something better.
Yes! Finally the answer I was looking for. I spent the last 2 days searching, asking, learning physics solutions because another post said I needed Bullet or I needed NxOgre. Well this game, which is a Wii Play Tanks clone of sorts, doesn't need physical dynamics. Just collisions if you please.

I will learn physics later but have no time at the moment.

Ok so I reserve the right to ask you more questions if, after diving into the source code, I need to. :roll: :)

Thanks so much for your help.

EDIT: Just watched the video of your game. Nice... a lot of blood. :) My son likes those bloody games too. What is wrong with you people! :roll:

Steve

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Mon Jan 10, 2011 4:00 pm
by siondream
Wow, this is really great for beginners like me. Have you thought of providing some documentation among the code? Doxygen style documentation would be really great in orden to get a better understanding of the system.

Thanks again!

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Mon Jan 17, 2011 10:40 pm
by rogerdv
i havent used MOC in a log time. Does it has been updated to work with new terrain system?

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Sat Jun 25, 2011 10:29 pm
by Mafioso
Hello there, I've just implemented MOC::collidesWithEntity into my app, but I've got a problem. I placed two entities opposite to each other and slowly move one towards another that stands still, it works fine, but then I increase the movement speed of the moving entity, the function always returns that collision occured, as far as I know the variables are incorrect in the collidesWithEntity function:

Code: Select all

distToColl = -0.8
distToDest = 1.0
Can anybody help me with this? Thanks in advance.

P.S. And thanks for your time and great work creating this easy to use lib :)

EDIT: I've found out that the gliches occur when frame rate is low, if it's hight enough, even on maximum speed it works fine, any ideas on how to fix it? I would be really grateful :(

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Sat Jul 23, 2011 7:57 am
by maxiwill
hi,

does anybody know what the ETM (Enhanced Terrain Manager) do in the source code?

I'm just wondering if I should implement my own set of terrain manager or not :o

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Wed Aug 31, 2011 2:46 pm
by singmelody
Thanks for that. Now I am using it.

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Wed Sep 14, 2011 10:31 am
by Nauk
@Maxiwill: ETM is not required, we just used it because we had the setup ready to demo MOC.

@Singmelody: Great to see people still using MOC :)

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Thu Oct 13, 2011 8:45 am
by JDX_John
A quick question for anyone using MOC for picking... does it support static meshes only or will it work on animated entities too?

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Thu Oct 13, 2011 12:39 pm
by MorrK
i think the current version is just working with not animatied entitys but its easy to make it work with animations as well using this: http://www.ogre3d.org/tikiwiki/Raycasti ... ed_version

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Wed Feb 15, 2012 10:56 pm
by eferaga
Hello, i have the next problem i try to use the function

collidesWithEntity(Ogre::Vector3::ZERO,Ogre::Vector3(50,0,0),60.0f,-1.0f);

and i just do that to get always a true in the collision detection just to test, but the problem is that i always get false the result of this :s, so i would like to know what else do i have to add to achieve the collision or what do i have to modify, i would be very grateful if someone can help me out with this since i need it for a school project,

Sincerely,
Eferaga

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Sun Feb 26, 2012 1:48 pm
by Nauk

Re: MOC - Minimal Ogre Collision 1.0 - [Update 03.May.2009]

Posted: Sat May 12, 2012 12:03 pm
by fiorebat
hi, set up an application with ogre 1.7.3, no artifex, with 3 meshes, 1 particle, if I put the MOC, it works well, but my frame rate goes to 0,7 ~ 1,3 :)

I try a version posted backwards (col3=) but is the same.

Some idea?

tnx