How to turn on CCD

tomneo2000

24-09-2009 14:51:29

How to turn CCD for Actor in NxOgre. My bullet fly through the wall without collision. Beside, what is CCDMotionThreshold mean?

betajaen

24-09-2009 15:20:37

BloodyMess/Git doesn't support CCD skeletons yet.

If you want to have bullets in your game; then you need use to rays for the physics and the Ogre particle system (or something like it - ManualObject perhaps) for the visuals.

tomneo2000

25-09-2009 06:08:55

BloodyMess/Git doesn't support CCD skeletons yet.

If you want to have bullets in your game; then you need use to rays for the physics and the Ogre particle system (or something like it - ManualObject perhaps) for the visuals.


i have an idea but not sure it work's or not

use time listener and in each time step create a ray from the bullet's last position to the current position then check if ray is hit something or not to delete bullet, also retrieve hit position and play spark.

if this is work then i don't need to use CCD just run through each bullets in time step.

Otherwise i have to go in PhysX to turn CCD but it need to create CCD skeleton.

Could you explain how to use Manual Object it sounds like it can be created in NxOgre or PhysX then use Ogre to render.

betajaen

25-09-2009 10:19:08

BloodyMess/Git doesn't support CCD skeletons yet.

If you want to have bullets in your game; then you need use to rays for the physics and the Ogre particle system (or something like it - ManualObject perhaps) for the visuals.


i have an idea but not sure it work's or not

use time listener and in each time step create a ray from the bullet's last position to the current position then check if ray is hit something or not to delete bullet, also retrieve hit position and play spark.


Bullets travel too fast for this to be actually useful. According to Wikipedia a bullet from a rifle travels at a speed of 1000ms. So in 1/60 of a second - or a timestep, the bullet has travelled 16 metres. If your game is indoors, then a single raycast is enough.

Personally, and I recommend you to is; Just do a single raycast now. Then worry about your fancy raycast/listener bullet system later.

tomneo2000

25-09-2009 14:32:13

BloodyMess/Git doesn't support CCD skeletons yet.

If you want to have bullets in your game; then you need use to rays for the physics and the Ogre particle system (or something like it - ManualObject perhaps) for the visuals.


i have an idea but not sure it work's or not

use time listener and in each time step create a ray from the bullet's last position to the current position then check if ray is hit something or not to delete bullet, also retrieve hit position and play spark.


Bullets travel too fast for this to be actually useful. According to Wikipedia a bullet from a rifle travels at a speed of 1000ms. So in 1/60 of a second - or a timestep, the bullet has travelled 16 metres. If your game is indoors, then a single raycast is enough.

Personally, and I recommend you to is; Just do a single raycast now. Then worry about your fancy raycast/listener bullet system later.



In commercial game you can see a lot of bullet tracer it is so pretty. Do you know how they do it? base on raycast for accurate hit detection and use particle for bullet tracer?

betajaen

25-09-2009 15:03:26

yes, or a manualobject with a line.

tomneo2000

26-09-2009 05:37:44

yes, or a manualobject with a line.

How to do manual object, could you give me some direction?

spacegaier

26-09-2009 13:33:41

ManualObject is an Ogre class...and therefore searching the wiki and the forums could help ;) :

http://www.ogre3d.org/wiki/index.php/ManualObject
http://www.ogre3d.org/wiki/index.php/Line3D

And of course the Ogre API:

http://www.ogre3d.org/docs/api/html/cla ... bject.html

tomneo2000

26-09-2009 16:29:18

ManualObject is an Ogre class...and therefore searching the wiki and the forums could help ;) :

http://www.ogre3d.org/wiki/index.php/ManualObject
http://www.ogre3d.org/wiki/index.php/Line3D

And of course the Ogre API:

http://www.ogre3d.org/docs/api/html/cla ... bject.html


Thank you.
I thought it is in NxOgre.

betajaen

26-09-2009 16:47:21

You must be thinking of ManualMesh, which has a similar name.