|
Post by archieandrews on Aug 29, 2018 3:23:46 GMT
I have a camer state change that I haved parented to an elevator via C# script.
The camera state is Fixed Point but the camera will not move with the elevator.
How do I get this work? I want a fixed point cam so user cannot move camera around and I have character controls disabled during the ride.
Thanks
|
|
|
Post by archieandrews on Aug 29, 2018 11:00:20 GMT
Hi is this possible?
|
|
|
Post by Invector on Aug 29, 2018 14:01:38 GMT
In the CameraMode Fixed Point we have a option called "Static Camera", which will not look at the Player. Check the vMansion for more examples of Fixed Point camera ;)
|
|
|
Post by archieandrews on Aug 30, 2018 22:35:02 GMT
Yes I have that set already but the camera starts to follow as the elevator lowers but then raises back to its original Fixed Point instead of tracking with the elevator.
Imagine a camera in an elevator
|
|
|
Post by Invector on Aug 30, 2018 23:16:18 GMT
can you record a video showing the issue?
|
|
|
Post by archieandrews on Aug 30, 2018 23:49:51 GMT
At the end on the clip the cage goes down but then the camera it starts to drift up once the cage stops at a trigger point. As you can see the camera becomes parented to the cage mover object
|
|
|
Post by archieandrews on Aug 30, 2018 23:52:57 GMT
It would probably be ideal to parent the LOOK POINTS but I dont an easy to access these by code ?
|
|
|
Post by Invector on Aug 31, 2018 18:04:51 GMT
Hmm I think it's best if you don't parent the camera...
|
|
|
Post by tharindu on Aug 31, 2018 18:27:53 GMT
It would probably be ideal to parent the LOOK POINTS but I dont an easy to access these by code ? Got an idea. Try parent both player and camera to the elavator until you get out ? Try and keep the movement locked to avoid any wonky effects.
|
|
|
Post by archieandrews on Sept 1, 2018 8:12:14 GMT
Hmm I think it's best if you don't parent the camera... How would that work? I want the camera to be fixed to the elevator.
The character is also fixed so as to follow down the shaft
so as to view the inside during descent
|
|
|
Post by archieandrews on Sept 1, 2018 8:16:02 GMT
Hmm I think it's best if you don't parent the camera... How would that work? I want the camera to be fixed to the elevator.
The character is also fixed so as to follow down the shaft
so as to view the inside during descent
Got an idea. Try parent both player and camera to the elavator until you get out ? Try and keep the movement locked to avoid any wonky effects.
Tharindu that is already how it is set.
|
|
|
Post by witcher on Sept 1, 2018 11:21:00 GMT
Its best to use cinemachine for this. otherwise you would have to use 2 cameras and switch on/off when you get in and get out
|
|
|
Post by ceebeee on Sept 1, 2018 20:58:01 GMT
Why not just leave the camera in follow mode? then it will follow the character as the move down. Just change to a camera state that faces the character and has very tight follow conditions so it doesn't stray far from the character.
|
|
|
Post by tharindu on Sept 2, 2018 10:30:53 GMT
Its best to use cinemachine for this. otherwise you would have to use 2 cameras and switch on/off when you get in and get out archieandrews This should work as well. I have to agree. Take a look at my cinemachine tutorial if you don't know how to use it to drive invector cameras. Have a virtual camera inside the elavator looking at your character (LookAt target of the vcam that is). Have a trigger to simply change the priority of the vcam to a higher value as the elavator moves, change it back to 0 when your elavator stops.
|
|
|
Post by Invector on Sept 2, 2018 14:34:17 GMT
Oh I thought you wanted the camera to be static and just watch the elevator go down. In this case, uncheck the static option and parent both player and camera to the elevator, it should work
|
|