#hm
1 messages · Page 1 of 1 (latest)
I think we found the problem
You see that thing?
Camera.transform.position
That changes the camera’s position
Just put // infront of it to comment it out
Is there leftover semicolon…
That's all one piece of code, if it's split over multiple lines, you need to do it for all the lines
find the ); that finishes it
/* void Update() { camera.transform.position = new Vector3( currenthitbox.transform.position.x, currenthitbox.transform.position.y, camera.transform.position.z ); */
Yea that’ll do
Nope
im abit confused what you mean
Wait
You've commented out the method
oh
TWIX
so i delete it instead
YOU COMMENTED VOID UPDATE
OH
YOU”RE MEANT TO COMEMNT ON JUST THE CAMERA TANSFORm
Stop with the caps.
/* { camera.transform.position = new Vector3( currenthitbox.transform.position.x, currenthitbox.transform.position.y, camera.transform.position.z ); */
Uhh
Its meat to be /* camera.transform.position - - -
Camera.transform.position.z
);
*/
OH
I think that first { is for void update
So it’s going to hae } but not { and unity’s going to give you another error
I don’t even code much.. i took 3 cs50 lectures and i know you’re not meant to comment out the {
{
// camera.transform.position = new Vector3( //
currenthitbox.transform.position.x,
currenthitbox.transform.position.y,
/* camera.transform.position.z
); */
```
oooh
i only started using unity/coding 2 months ago since im taking 1 game dev class
but the class ended now so i cant get help
but assignment still due
🥺
did i do it right
@agile crest
Vector3 currentMovement = this.rb.velocity;
currentMovement.Scale(new Vector3(0.0f, 1.0f, 0.0f));
// Moving left
if (Input.GetKey(KeyCode.A))
{
if (!this.facingLeft) {
this.flip();
this.facingLeft = true;
}
currentMovement += new Vector3(-this.movementSpeed, 0.0f, 0.0f);
}
// Moving Right
if (Input.GetKey(KeyCode.D))
{
if (this.facingLeft) {
this.flip();
this.facingLeft = false;
}
currentMovement += new Vector3(this.movementSpeed, 0.0f, 0.0f);
}
/* Moving Up
// if (Input.GetKeyDown(KeyCode.W) && !isJumping)
{
this.isJumping = true;
currentMovement += new Vector3(0.0f, this.jumpSpeed, 0.0f);
}
// Moving Down
if (Input.GetKeyDown(KeyCode.S) && isJumping)
{
currentMovement += new Vector3(0.0f, -this.jumpSpeed, 0.0f);
}
*/
this.rb.velocity = currentMovement;
}
public static bool setCanSteal(bool canSteal)
{
if (Player_Controller.instance.isJumping)
{
return false;
}
else
{
Player_Controller.instance.canSteal = canSteal;
Player_Controller.instance.rb.velocity = new Vector3(0.0f, 0.0f, 0.0f);
return true;
}
}
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.CompareTag("Ground"))
{
this.isJumping = false;
}
}
public static void startTalking()
{
instance.isTalking = true;
}
public static void stopTalking()
{
instance.isTalking = false;
}
public static void ActivateHumanForm()
{
if (!instance.isHuman) {
instance.isHuman = true;
instance.humanform.transform.position = instance.foxform.transform.position;
instance.currenthitbox = instance.humanform;
instance.humanform.SetActive(true);
instance.foxform.SetActive(false);
instance.rb = instance.currenthitbox.GetComponent<Rigidbody>();
Guardmanager.destroyAllGuards();
}
}
public static void ActivateFoxForm()
{
if (instance.isHuman) {
instance.isHuman = false;
instance.foxform.transform.position = instance.humanform.transform.position;
instance.currenthitbox = instance.foxform;
instance.humanform.SetActive(false);
instance.foxform.SetActive(true);
instance.rb = instance.currenthitbox.GetComponent<Rigidbody>();
}
}
}
it made me send it in 2 parts
Oh dear
is that bad
This
camera.transform.position = new Vector3(
currenthitbox.transform.position.x,
currenthitbox.transform.position.y,
camera.transform.position.z
);
is one line of code, split over multiple lines for readability. It is actually:
camera.transform.position = new Vector3(currenthitbox.transform.position.x, currenthitbox.transform.position.y, camera.transform.position.z);```
So you can't comment out _ONE_ line of it
Anything over 2kb im scared of
Damn carwash smart
2kb, 5kb for a script file is irrelevat
carwash
Totally off topic but I found a lego cowboy hat xD
Parrot xD
{
currenthitbox.transform.position.x;
currenthitbox.transform.position.y;
```
The current hit box.transform
shouldi delete them
Sec
sec?
Can you show me line 62 row 13?
Yeah delete both…
Well finally…
i did get one error when i played but still lets me play so i dont think it matters
yes
I am genuinely confused
Twix
Can you try to like
Make the camera smaller, with teh scale tool
Make it roughly the height of the white wall
i dont think i can i changed all the scale x,y,z to 100 and then changed them to 0 and it was the exact same size
Do you mean
“I can’t scale the camera”
yes
How…
i even tried using the scale tool
How did you make the camera gigantic then
i dont think i changed the size of it when i brang it in
Why is it still big…
Wait Twix
What about the SCENE
Maybe you can scale that up
i can scale it up
but i can only see the background
im thinking making a new camera doesnt automaticalyl make it the game view
Then move the scene up
Delete the old camera nd use the new camera…
yeah i deleted the old one and am using the new one

