I added a plane. Then added a character controller and First Person Controller to my Main Camera, but I can’t look side to side, only up and down. Am I doing something wrong?
1 Answer
1@thehawk2323 So, do you only have a camera as your player? if so, you need a gameObject as the parent of the camera. the camera doesn’t need any components except the “Camera” component, of course. all the other components should be put on the parent gameObject. what I mean is, you have a parent gameObject with the Character Controller component and the First Person Controller script added to it. the camera shouldn’t have the First Person Controller script and Character Controller component on it.
if all that doesn’t work, just see if there are any errors and if there are any, and you can’t figure them out, just show them to me and I’ll see if I can.
Hope this helps!
Could have something to do with not normalizing the direction you're applying the force in?
– RedHedZed
dist = Vector3.Distance(plt.position, sun.position); gravity = multiplicationFactor*((mass1mass2)/(distdist)); GetComponent.<Rigidbody>().AddForce((target.position - transform.position) * gravity); I wrote this and started the simulation: [64648-ekran-alıntısı.png|64648] which somewhat looks like this : https://en.wikipedia.org/wiki/Rosetta_(orbit) (so yeah, it looks like I accidentally simulated a complex type of orbit) So, I'm probably very stupid that I'm missing something very easy to figure out.
– Arda06Also I was ignoring the effect on the Sun itself, I added the same script to sun (which has about 100000 times the mass of orbiting planet). The sun getting very slightly offset of system's gravitational barycenter, which means I don't ignore this anymore. This didn't also made a difference. Btw thx for all your efforts.
– Arda06