Question by
GG_Moonboots · Jul 27, 2016 at 07:47 AM ·
collisionplayer movementnewbieonkeydown
On keydown, moving the player to position of an empty game object with specific tag
Forgive me, I'm a total newbie at coding.
What I'd like to do is:
The player presses spacebar
The game looks for the closest gameobject with tag "Ground" (there are many in the scene, in some cases the player may be close to two of them)
The player is moved to the position of that object
Deactivate the collision on a different, third object
Right now I'm using triggers and it's messy and doesn't work well. I think this solution will be more reliable.
I'll be adding this to my playercontroller script.
I'm hoping someone can give me some advice as to how to get started. Thank you! :)
Comment