C
C#2y ago
Kapier

New to unity and c# how do I make a camera follow an object and rotate around a certain point on the

New to unity and c# how do I make a camera follow an object and rotate around the object
4 Replies
Kapier
KapierOP2y ago
I can get it to follow the object with: transform.position = player.transform.position + offset; but then when it goes to rotate the camera stays inplace. with out that transform the camera will rotate correctly but not follow the object with: transform.RotateAround(point, Vector3.up, Time.deltaTime * script.turnSpeed * horizontalInput); the transformation is forcing it to stay in place and I am not sure how to fix it I finally got it!!!! using: transform.position = player.transform.position - transform.forward * -0.7f + offset;
Pobiega
Pobiega2y ago
Glad you got it working! In the future, for unity specific questions like this, ask in $unity first. This is a C# discord, so we don't mind helping with the C# logic - but unity specifics belong on their discord.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server