Page 1 of 1

Question about camera trigger motion

Posted: Wed Dec 07, 2016 4:31 am
by phamtuanchip
Hi everyone,
I am new to Irrlicht Engine for my study, I try to build a Virtual Gallery with some camera observation and viewpoint
however I dont know how to trigger when my player go into the viewpoint
Is there anyone know how to code it?
Thank for sharing

Re: Question about camera trigger motion

Posted: Wed Dec 07, 2016 6:13 am
by trivtn
Using ! setActiveCamera( ICameraSceneNode * camera ) in irr::scene::ISceneManager ! Hope this help !

Re: Question about camera trigger motion

Posted: Wed Dec 07, 2016 8:45 am
by Virion
For collision part you can check whether the AABB (axis-aligned bounding boxes) are intersecting each other. depending on which trigger's AABB is intersected, then you activate it.

Re: Question about camera trigger motion

Posted: Wed Dec 07, 2016 10:43 am
by CuteAlien
Irrlicht has no event system, so the triggers have to be written by you. You can usee bounding-boxes like Virion proposed or any kind of invisible polygons to mark areas which collide. Then you have to check in code if your object is having a collisions with that area. If you want specific triggers for entering/leaving the area then you have to check constantly and create some trigger (event/message) when the collision state changes.

I'm not certain what exactly you are doing. But when I hear virtual gallery I wonder if maybe CobberCube might be something which would be easier to use for you. It's from the same author who wrote Irrlicht originally, but is a 3d engine that runs in browsers. And it has already an event system (called actions/events there) for triggers like proximity and clicking objects. Also your gallery would then even run online. See here: http://www.ambiera.com/coppercube/index.html

Re: Question about camera trigger motion

Posted: Fri Dec 16, 2016 9:58 am
by phamtuanchip
Thank Everyone for the answer, I will try and give my feedback.
My screen is attachment you could see
Image
image url https://1drv.ms/i/s!Agr7oolSpz5An8hfh9M4mx8Zvl9XlQ