#Sticking Player to Planet

1 messages · Page 1 of 1 (latest)

still lion
#

yo

#

so basically i have this planet

#

have this astro guy

#

trying to make him walk around on the planet simple

#

so, i got gravity working, but the only problem is it's not "standing" on it, more like just falling over

steady belfry
#

iirc there is a simple youtube on this

still lion
#

any suggestions?

#

there is?

#

oh bruh

steady belfry
#

you mean this ?

still lion
#

oh, gravity is already done

#

im just having trouble making the guy not fall over

steady belfry
still lion
#

i'll try it out and brb

#

although, I don't completely understand how they made the player "Stand"

lone kite
#

You would need to lock rigidbody rotation and update it manually calculating from the center sphere

steady belfry
#

dont just copy code, cause u missing a script from FauxGravityAttractor

still lion
#

yeye

steady belfry
#

ya constraints for sure, thats just doing it via code

still lion
#

so, something like this? (same forum place)

#

after locking the rotations

lone kite
#

ehh, you can get a vector by just subtracting position in relation to the sphere and use forward offset to apply it to the character

still lion
#

althouhg, i did a similar thing before using LookAt

#

ah

#

aight well ima go have an attempt at that

lone kite
#

Many ways to get the rotation

#

Use Debug.DrawLine or ray to visualize what you get and see how it works

steady belfry