Question about camera trigger motion

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
phamtuanchip
Posts: 2
Joined: Wed Dec 07, 2016 4:24 am

Question about camera trigger motion

Post 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
trivtn
Posts: 132
Joined: Tue Jan 17, 2006 12:30 pm
Location: Viet Nam
Contact:

Re: Question about camera trigger motion

Post by trivtn »

Using ! setActiveCamera( ICameraSceneNode * camera ) in irr::scene::ISceneManager ! Hope this help !
There's something is fantastic, there's nothing is absolute.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Re: Question about camera trigger motion

Post 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.
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Question about camera trigger motion

Post 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
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
phamtuanchip
Posts: 2
Joined: Wed Dec 07, 2016 4:24 am

Re: Question about camera trigger motion

Post 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
Post Reply