Hi all,
Is it possible to draw some path (suppose some complex curve) in IrrEdit or some 3d design program and then move camera/object along that path?
I dont mean some mathematical masturbation inside program code - just some invisible spline made in 3d designer.
Is such thing possible?
Camera/object movement along path
yes, there is a scene node animator in irrlicht called follow spline scene node animator. (ESNAT_FOLLOW_SPLINE )
My company: https://kloena.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
-
rogerborg
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Don't listen to these hippies. No, Irrlicht does not provide any built-in mechanism to load a spline that was created in an external application. You have to use "mathematical masturbation" to define all the points.
However, you could model and save out an invisible mesh composed of nothing but joints, and automate the masturbation, something like this:
However, you could model and save out an invisible mesh composed of nothing but joints, and automate the masturbation, something like this:
Code: Select all
core::array<core::vector3df> points;
scene::IAnimatedMeshSceneNode * joints = smgr->addAnimatedMeshSceneNode(smgr->getMesh("splinesMesh.X"));
for(u32 jointId = 0; jointId < joints->getJointCount(); ++jointId)
{
scene::IBoneSceneNode * joint = joints->getJointNode(jointId);
points.push_back(joint->getPosition());
}
scene::ISceneNodeAnimator * splineAnimator = smgr->createFollowSplineAnimator(device->getTimer()->getTime(), points);
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
damn, that's bordering fetishism already.rogerborg wrote:Don't listen to these hippies. No, Irrlicht does not provide any built-in mechanism to load a spline that was created in an external application. You have to use "mathematical masturbation" to define all the points.
However, you could model and save out an invisible mesh composed of nothing but joints, and automate the masturbation, something like this:
Code: Select all
core::array<core::vector3df> points; scene::IAnimatedMeshSceneNode * joints = smgr->addAnimatedMeshSceneNode(smgr->getMesh("splinesMesh.X")); for(u32 jointId = 0; jointId < joints->getJointCount(); ++jointId) { scene::IBoneSceneNode * joint = joints->getJointNode(jointId); points.push_back(joint->getPosition()); } scene::ISceneNodeAnimator * splineAnimator = smgr->createFollowSplineAnimator(device->getTimer()->getTime(), points);
good code. been lookin for a solution but hesitated to ask it here.

Bah! It doesn't curve in motion there, just a broken line movement, not to mention all the must.
If you want a really nice curly motion, without any coding at all, don't listen to these punks and hippies. I mean really smooth movement with camera looking around and everything. No programming at all. Don't listen to anyone.
If you want a really nice curly motion, without any coding at all, don't listen to these punks and hippies. I mean really smooth movement with camera looking around and everything. No programming at all. Don't listen to anyone.
i will use this technique when i set up a sample custscene sometime later. the code is a good example, tho i still need to figure out how to synch it to a dialog. and background music is something i have to study too.
a custscene manager is needed, then a cutscene class will have to be coded. i'm sure there's going to be a timeline object in there along with quaternions and slerp as well.
there's just too much complexity right there, hope i can do it and make a sample custscene.
a custscene manager is needed, then a cutscene class will have to be coded. i'm sure there's going to be a timeline object in there along with quaternions and slerp as well.
there's just too much complexity right there, hope i can do it and make a sample custscene.

-
rogerborg
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Careful! Don't tell us too much about your ideas or we might steal them and trade them for beer and hookers.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
