Hi there,
I've crated a curve and I want a camera follow this curve looking at a specific object. In the project I've attached I've the camera goes follow the curve but it looses it's up direction.
Does any1 know the reason of this?
Thanks
camera curve follow
(8 posts) (2 voices)-
Posted 1 year ago #
-
I updated your project with a few changes:
1) I am not sure what is going on with that curve follow BB in terms of orientation, but I recommend to use the curve progression BB instead, as it splits its output into position and direction, it's more easy to work with
2) I get the orientation of the camera, then set the orientation using it's current direction, but forcing it's up to be 0,1,0 -- this ensures that your camera will never become "tilted"
Hope this works for you.
Posted 1 year ago # -
Thank man!
You're great
Posted 1 year ago # -
Hi Ian,
a drastic up to this post because I was wondering how to do the same in VSL. Any Idea?Posted 9 months ago # -
Well... those building blocks were created specifically to make following a curve easier. I would recommend you do it in a schematic task... but it's certainly possible in VSL still, just a lot more complicated because you don't have the "Curve Progression" building block, so you'd have to get all the control points of the curve, put them in an array, and manually set the orientation / movement of your object based on those.
Is there any reason you'd want to do this particular task in VSL instead?
Posted 9 months ago # -
well,
the reason is that I'm just few commands (or I think "few command") to the solution.
e.g....
if (e.leftButton){
myView.SetCamera(focusCam);
auxpoint.new(1);
focusCam.GetPositionInSpace(auxVec,NULL);
auxpoint.Position.Set(auxVec.x,auxVec.y,auxVec.z);
myCurve.AddControlPoint(auxpoint);
auxpoint.new(1);
reference.GetPositionInSpace(auxVec,NULL);
auxpoint.Position.Set(auxVec.x,auxVec.y,auxVec.z);
myCurve.AddControlPoint(auxpoint);/*******command to follow a path :-)******/
}
...I think to implement a schematic task or function with the task you gave me many months ago.
Thanks anyway
Posted 9 months ago # -
Hi Ian,
after the code I've wrritten 3 days ago I've added the following lineGetTask("moveIn_curve").Start();
that links to a task composed as in the image attached.
Tha camera moves smoothly on the curve but when it reaches the end poi it seems that the FOV disappear and I just seee a grey screen....
why is this happening?Posted 9 months ago # -
Ok... solved!
I've set the lookat value and the ending point of the curve to the same object so the FOV went in a mess!
Posted 9 months ago #
Reply
You must log in to post.


