Camera not moving with Player if move with object ability is active

MarkusKer

Member
I implemented the move with object ability. I have a object that is animated with the animator and i attached the kinematic object script to it. With a custom script i set this object as a target in the ability. It is working great but as soon as i do this the camera is no longer following the player and stays in position. As soon as i disable the kinematic object script the camera follows the player again but as expected the player is jittering.

I am using this in combination with the drive ability.
 
Last edited:

Andrew

Moderator
Staff member
Do you see the Anchor transform on the CameraController change when this happens? What ViewType are you using?
 

Andrew

Moderator
Staff member
Hm, haven't seen this issue before (what version of UCC are you on?). Can you reproduce this in the demo scene at all? It does sound like there's something else other than the object itself interfering with the camera because there's no reason it should. If you're able to reproduce this in either the demo scene or in a fresh project with minimal elements that would be useful.
 

MarkusKer

Member
I tried my best to reproduce it and the easiest way to do it is using the sky car from the demo scene. I added my own animation to the animator which is just simply moving the car forward using the transform values. Than i added the kinematic object script. If it is set up like this the camera is not following the player anymore. I also could reproduce this in a new project aswell. I am not sure where to check the version but i am above 2.2
 

MarkusKer

Member
Hello, i created a new project again. This time i figured out what the problem might be. Setting the players update position mode to "update" instead of "fixed update" is solving the problem. However if the animated object (in this demo case) the skycar has reached its destionation via the animator and i exit the car, the player is reset to the location where he entered the skycar. I will try to create a small repo project.
 

MarkusKer

Member
I am still not sure why this behaviour is happening. Do you have any idea in which direction i could start debugging?
Regards,
Markus
 

Andrew

Moderator
Staff member
Hm not sure about this one, haven't seen this happen before. Does toggling root motion position on the character have any effect?

Pinging @Justin in case he has an idea.
 

MarkusKer

Member
I am starting to close in on the issue. i used a script which is activating the move with object ability and assigned the skycar. if the skycar has the kinematic script attached and the player is set to normal update this is happening. However if i do not activate the move with object ability and the player is set to update it is working. The Only strange part is, that after getting out of the car i am unable to move. animations are playing but there is no changing in the position itself.
 

Andrew

Moderator
Staff member
I see, I guess since you're moving the car with an animation then it would make sense to use root motion position on the character too. Well glad you figured it out in any case!
 
Top