#thread6

1 messages · Page 1 of 1 (latest)

fringe sonnet
#

thread

#

so first all, what sort of perspective are you working with, 3d/2d? Topdown, sidescroller, first person etc

ruby estuary
#

3d 3rd person

#

i have a code for movement and camera free look but no jumping code

fringe sonnet
#

okay, so what method are you using for movement?

ruby estuary
#

tbh i was watching a brackeys video so idk really know what method it was but i have the code as a picture

fringe sonnet
#

alright, well better to make it a pastebin link if it's fairly long but yeah when you do watch videos you should pause and get a general idea of why your typing certain code

#

also something that took me awhile to catch onto is "methods" are just what people call functions in C#, there's a lot of nomenclature but you'll get the hang of it. Feels like everytime I ask a question, I get corrected on terminology lol

ruby estuary
#

at the beginning it wasnt that confusing but then when it got to Mathf and Atan2 i was getting confused

fringe sonnet
#

oh, how's your Trig?

ruby estuary
#

if you are talking about Trigonometry it is horrible also this is my first unity game so i might not no much

fringe sonnet
#

ah okay, it's something you'll want to brush up on then because a lot of stuff is based on vectors and a lot of using vectors goes hand in hand with trig

ruby estuary
#

ok

fringe sonnet
#

But really you shouldn't need that for movement

#

could you throw the code you have for moving your player into a pastebin (and select C# in it) please?

ruby estuary
#

one sec

#

want the link

fringe sonnet
#

and this script is attached to the player object yes?

ruby estuary
#

yes

#

and i can move it and move the camera so it works

fringe sonnet
#

what's in the CharacterController class?

ruby estuary
#

what's that mean

fringe sonnet
#

oh my bad, I thought that was a class you made, apparently that's a built in unity class

ruby estuary
#

oh cause i saw the public class but i didnt see CharacterContriller class

fringe sonnet
#

well just pulled up the doc for that class and it seems your answers lie there

ruby estuary
#

Controller*

fringe sonnet
#

I haven't messed around with that functionality of Unity yet, just been doing rigidbody manipulation myself. But it seems like it has a jumping functionality baked into it

#

In your movement script do you understand what part of it is actually performing the movement?

#

the specific method that is

ruby estuary
#

ye

fringe sonnet
#

okay sweet, so yeah if your player object has a rigid body with gravity on it, you should be able to figure out the jump stuff from there

#

you'll likely want to mess around with those gravity and mass values though, too much and it won't appear like your player is jumping--it will be but just it's not enough force to actually make it get off the ground

ruby estuary
#

So i actually have a code with movement and jumping but the the camera doesnt work and you cant go around so idk if i could just code something for just the camera

fringe sonnet
#

hmm, yeah I wouldn't be a good person to ask on that, I haven't done much with the camera myself. I'm doing 2D so the camera controls for that are pretty basic