#sure just make a thread if there a lots

1 messages · Page 1 of 1 (latest)

soft patio
#

ok

#

hello i need help with my camera i was copying this tutorial because i just got into unity and my camera just falls right through my character i can send photos of my unity if needed

#

ok ill send the photo now

ionic herald
#

k

soft patio
#

and tell me if you need more

ionic herald
#

firstly

soft patio
#

ill just send my camera setup

ionic herald
#

k

soft patio
#

tutorial

ionic herald
#

can you tell me the timestamp of the camera section

soft patio
#

ok

#

42 to 3:20

ionic herald
#

can i see the inspector of playercam object

soft patio
#

what is that

#

oh

#

i see

#

those two

#

if you see the camerapos that controlls where the camera goes

#

and i think

#

because i put rigidbody on a parent the camerapos justfalls

ionic herald
#

just checking, you haven't put a rigidbody on the camera, right?

soft patio
#

no

ionic herald
#

oh

#

okay one sec

soft patio
#

do you want me to show you my code

ionic herald
#

no i think i got the problem one sec

soft patio
#

ok

ionic herald
#

wait, only the cameraPos, falls?

#

not any of the other child objects like playerobject/orientation

soft patio
#

no everything in the player parent falls

#

but

#

they just hit the ground

#

let me check rq

ionic herald
#

turn off is kinematic in your player object rigidbody

#

that's probably what's causing it

soft patio
#

ok

#

its off

#

i fixed it

#

i just turned it on

#

lol

#

what does that do though

ionic herald
#

wait

#

wait it was off?

soft patio
#

ye

ionic herald
#

send inspector of player object

soft patio
#

ok

#

the ridgidbody is in the parent

#

player

ionic herald
#

yeah

soft patio
#

send player ?'

#

or playerobject

ionic herald
#

player, the parent object

soft patio
#

ok

ionic herald
#

also ur pfp is cool, did u make it or find it?

soft patio
soft patio
#

do you know what it is?

ionic herald
#

sage from val?

ionic herald
soft patio
ionic herald
#

that's...weird

soft patio
#

thanks for the help lol

#

can i add you

ionic herald
#

oh wait

soft patio
#

ye

ionic herald
#

send script of player parent

#

like any scripts attached to it

soft patio
#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
[Header("Movement")]
public float moveSpeed;

public Transform orientation;

float horizontalInput;
float verticalInput;

Vector3 movePerson;

Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
rb.freezeRotation = true;
}

void Update()
{
    MyInput();
}

private void FixedUpdate()
{
    MovePlayer();
}

private void MyInput()
{
    horizontalInput = Input.GetAxisRaw("Horizontal");
    verticalInput = Input.GetAxisRaw("Vertical");
}

private void MovePlayer()
{
    // calculate movent direction
   movePerson = orientation.forward * verticalInput + orientation.right * horizontalInput;

    rb.AddForce(movePerson.normalized * moveSpeed * 10f, ForceMode.Force);
}

}

#

@ionic herald

#

you there

ionic herald
#

wait

#

does your ground have a box collider?

#

@soft patio

soft patio
#

no it doesnt

#

@ionic herald

ionic herald
#

add one

#

or mesh collider

soft patio
#

ok

#

it has a meshcolider

#

@ionic herald

ionic herald
#

sorry sorry

#

okay would you mind getting on a vc and screensharing

#

you don't need to talk if you don't feel comfortable

soft patio
#

i cant talk anyway lol

#

but sure we can vc