Hi,
I've two spline animators. And I add one animator to one scene node and let that scene node follow it. And after some time, I want that scene node to switch to the other spline animator and want to follow that spline. Then it may be after some time, I want the scene node to use the previous spline again and follow it.
I don't know how to do or if it's can be done.
Does it make any sense at all?
Thanks in advance.
Switching Spline Animators
Switching Spline Animators
Aung Sithu
*** Check out my latest book, Beginner's guide to Irrlicht 3D engine: http://bit.ly/rSnm4O
Company: http://rivaledge.sg
*** Check out my latest book, Beginner's guide to Irrlicht 3D engine: http://bit.ly/rSnm4O
Company: http://rivaledge.sg
Thanks JP.
Is it possible to switch the spline with the speed on previous spline?
Because now when I remove the animators and add the new animator, the scene node jumps to that new animator, not smoothly.
In fact, I'm trying to use the splines as a guide for cars. So, when a car overtakes another, it needs to choose one spline which the car in front is not using. So, as in my attached figure, I want to switch from one spline to another smoothly.
Is it possible with these animators?
Thanks
Is it possible to switch the spline with the speed on previous spline?
Because now when I remove the animators and add the new animator, the scene node jumps to that new animator, not smoothly.
In fact, I'm trying to use the splines as a guide for cars. So, when a car overtakes another, it needs to choose one spline which the car in front is not using. So, as in my attached figure, I want to switch from one spline to another smoothly.
Is it possible with these animators?
Thanks
Aung Sithu
*** Check out my latest book, Beginner's guide to Irrlicht 3D engine: http://bit.ly/rSnm4O
Company: http://rivaledge.sg
*** Check out my latest book, Beginner's guide to Irrlicht 3D engine: http://bit.ly/rSnm4O
Company: http://rivaledge.sg
I think the spline animator is a bit too limited for what you want.... I guess it's possible but you might be better off designing your own system to handle this...
I guess if you want to make a car overtake and join the next spline a bit further ahead then you'd have to kind of find the position ahead which you want it to start on the other spline and then remove the current spline and then interpolate its position to move it into position on the next spline and then add the spline animator to it so it will carry on... I guess you could use a fly straight animator to move it into position on the next spline...
I guess if you want to make a car overtake and join the next spline a bit further ahead then you'd have to kind of find the position ahead which you want it to start on the other spline and then remove the current spline and then interpolate its position to move it into position on the next spline and then add the spline animator to it so it will carry on... I guess you could use a fly straight animator to move it into position on the next spline...
I see.
When I manually move my objects between waypoints, I can know my object's next wp, prev wp, etc. But now I've no control over my object which is moving along the spline.
So, how can I know my object's current target wp?
Many Thanks
When I manually move my objects between waypoints, I can know my object's next wp, prev wp, etc. But now I've no control over my object which is moving along the spline.
So, how can I know my object's current target wp?
Many Thanks
Aung Sithu
*** Check out my latest book, Beginner's guide to Irrlicht 3D engine: http://bit.ly/rSnm4O
Company: http://rivaledge.sg
*** Check out my latest book, Beginner's guide to Irrlicht 3D engine: http://bit.ly/rSnm4O
Company: http://rivaledge.sg
I would move them manually then, it will give you the added control you require. It may seem nice to use the follow spline animator but it's doing very little work really, it'll just be moving between the points passed to it in a similar way to the fly straight animator which is a trivial task. What you could do is do it manually but use the fly straight animator to move between the points if you'd rather not code the movement itself manually.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
As with many other things in Irrlicht (see cameras...) the built-in implementations are good for very common things, but not for app-specific ones. This would lead to far too much complexity, both on the interfaces and the logic. Instead, just take a look at the code and do your own animators. It's far simpler than one might assume, and it will give you full flexibility over the behavior of your nodes.
Hi,
Thanks JP and hybrid.
I got your point.
Thanks JP and hybrid.
I got your point.
Aung Sithu
*** Check out my latest book, Beginner's guide to Irrlicht 3D engine: http://bit.ly/rSnm4O
Company: http://rivaledge.sg
*** Check out my latest book, Beginner's guide to Irrlicht 3D engine: http://bit.ly/rSnm4O
Company: http://rivaledge.sg