View Full Version : Change main cameras rotation mid-race

05-02-2014, 12:11 AM
Alright then, here we go.

I'm creating a map in which I change the gravity direction and because of this I want the camera to rotate together with the rider when those gravity changes is happening. I do not want to have it following the rider, I just want the camera to rotate 90 degrees at some points and stay that way until told not to.

At first I tried to use "Object position event" to rotate the camera but no, it wont let me connect it. After that I discovered that I'm able to use "Object position event" on secondary cameras. So I spent a whole lot time to get that to work. But after making the camera following the rider using "object positioning event" and rotating the camera manually I discovered that the secondary cameras is not capable of visualizing the track ahed and move as the track is curved. It wont follow the rider and showing both the rider and the track as good as the main camera.

So my conclusion is that I need to find a way to rotate the main camera at some points and that the secondary camera is not the answer. So is there anyone out there who know how to do this?

If this wont help me I'll just find a way to rotate the whole track around the camera which is not something I'm looking forward to :mad:

Thank you for reading!

05-02-2014, 02:36 AM
If you tied the flipped secondary camera to the normal camera with an OPE instead of the rider, and set it's target to the yellow circle thing in front of the rider the camera should target the same as the game camera does and move exactly like it, just while being flipped.

05-02-2014, 02:45 AM
thank you Lukeyy, That's brilliant! I've been sitting here refreshing the page every 10 min and finally I can get back to work :D

Edit : Actually it's still not working as intended. Because according to the main camera I'm still on a wall and no the floor which makes it behave differently. But still its a lot better than before and it might be the best I can get. But I'll try to adjust it to some degree with manually changing coordinates.

Edit2 : I've come to a conclution that it cant be done to 100%. But what I did instead was to Adjust the placement of the second camera but still following the original. And then I created dummy that's placed bellow the rider as a new camera target for the second camera. This one is static though and not moving as the original is, this is where I hit the wall. So with the solution you gave me this is the best I can do.

05-02-2014, 04:06 AM
Okey so I bumped in to another stupid problem now. This time I'm not able to rotate secondary cameras once they got a target to follow. I've tried multiple cameras and if i rotate before I mark the object to follow it will just snap back to the original pose.
And the weirdest thing is... In my scene I'm working on I got a rotated camera with a target to follow. What am I too stupid to see?!

05-02-2014, 11:47 AM
Do you have the OPE set to rotation too? Only thing I can think of.

05-02-2014, 10:12 PM
maybe i have a simple solution for you.
create some datasources for objectifo for position z y x and three for anngle and link them to the bike.
Then create an OPE which takes its variables from the datasources above. Dont forget the impulstrigger!
create a dummy object and choose it as target in the properties of the OPE.
now drack the dummy object near the driver and glue the secondary camera at the position where you want it to be to the dummy object.
now the camera will follow the bike and rotate with it.
if you want to rotate the camera when the rider is not rotating just use variable datasources which you can affect with the event set value (translated this by miself)
hope this helped!