#sure just make a thread if there a lots
1 messages · Page 1 of 1 (latest)
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
k
and tell me if you need more
firstly
ill just send my camera setup
k
FIRST PERSON MOVEMENT in 10 MINUTES - Unity Tutorial
In this video I'm going to show you how to code full first person rigidbody movement. You can use this character controller as final movement for your game or build things like dashing, wallrunning or sliding on top of it.
If this tutorial has helped you in any way, I would really appreciate...
tutorial
can you tell me the timestamp of the camera section
can i see the inspector of playercam object
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
just checking, you haven't put a rigidbody on the camera, right?
no
no i think i got the problem one sec
ok
wait, only the cameraPos, falls?
not any of the other child objects like playerobject/orientation
no everything in the player parent falls
but
they just hit the ground
let me check rq
turn off is kinematic in your player object rigidbody
that's probably what's causing it
ye
send inspector of player object
yeah
player, the parent object
ok
also ur pfp is cool, did u make it or find it?
find it
do you know what it is?
sage from val?
so turning off is kinematic makes it still fall?
ye
yes
that's...weird
oh wait
ye
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
ill check
no it doesnt
@ionic herald