#Isometric Character Movement Issue

1 messages · Page 1 of 1 (latest)

glossy arch
#

Isometric Mouse Movement in Unity Tutorial using the NEW input system.

📥 Get the Source Code 📥
https://www.patreon.com/posts/isometric-mouse-38744509

🔗 Relevant Video Links 🔗
ᐅMaking an Isometric Tilemap with Elevations and Colliders in UNITY
https://youtu.be/_TY0F7Zm6Lc

🤝 Support Me 🤝
Patreon: https://www.patreon.com/samyg
Donate: https://ko...

▶ Play video
#

I'm sorry but I can't figure out a point where it could be wrong, since I followed it to the end and realized that clicking a tile just didn't do anything. I will now add a screenshot of my situation in Unity. Please ask me everything you need to know to help me

#

If it seems too vague I would also appreciate if you could tell me where the error may lie

green ridge
#

I haven't done this one, but I'll see what I can manage.
Have you gone through the tutorial a second time? I kinda need to anyway, so you might as well

But first off - can you explain how it is supposed to work, in practical terms?

glossy arch
#

When the player clicks on a tile, the player should go to it thanks to the move towards function, only if there is a tile in that position.

#

Right now the player character doesn't move at all

green ridge
#

Nothing happens?

glossy arch
#

yeah

#

I've watched the tutorial many times

#

but I must have missed something

green ridge
#

post links to all the scripts

glossy arch
#

OK

#

It's using the new input system

green ridge
#

if you want to know if a certain segment of code is running, add Debug.Log("This part is running") or whatever makes sense

glossy arch
glossy arch
#

I was used to std::couts and didn't know how it worked here

glossy arch
green ridge
#

hm, alright, then this might be easier to debug

#

I just haven't used the new input system 😂

glossy arch
#

should I use it like this? It's highlighted in red. I'm sorry for knowing so little

#

Maybe I could print the movementSpeed value to know what's up?

green ridge
#

logically, you want to see if the compiler reaches a specific Line in your code

#

Debug.Log prints out a message in Unity's Console, which tells you that it has run, and whatever other information you want to include

#
void Awake()
{
    Debug.Log("Awake is running");
}
glossy arch
green ridge
#

it's alright. I'm well aware of how lost one is when starting out with Unity.

glossy arch
#

so I did this, but the actual value of movementspeed isn't printed

green ridge
#

it says 2

#

is that movement speed?

glossy arch
#

oh you're right, I'm sorry I can't even read the log properly

green ridge
#

lol

glossy arch
#

yes, it's supposed to be that value

green ridge
#

good stuff

glossy arch
#

here I set the movement speed and the tilemap it should interact with, which is ground level

green ridge
#

Which Unity version are you using, and have you installed the Input System package?

glossy arch
#

Unity 2020.3.25f1

#

I think it's the 2020 LTS

green ridge
#

It is. Good.

#

I think I found your issue

#

on Line 43

#

video timestamp: 11:58

#

see if you can spot it

glossy arch
#

thank you so much! let's see if I can figure it out

green ridge
#

in your script, it's more like Line 50

glossy arch
#

ok I understand

#

I didn't assign the value

green ridge
#

indeed
Vector3.MoveTowards() calculates the positions for the movement. But you didn't apply it to anything.

glossy arch
#

I watched all the previous parts and didn't think of it I feel so dumb

green ridge
#

welcome to programming :)

glossy arch
#

Thanks so much for your time! you are great

green ridge
#

you get better at things over time

#

time and sleep is necessary for learning

#

You're welcome :)

glossy arch
#

It now moves, amazing

#

ok so should I close the thread or leave it here?

green ridge
#

This seems like a good tutorial, so I'm gonna keep that one for later. Nice reference.

#

you can close it now if you are done with all the stuff for that tutorial

#

Good luck on the next tutorial. Have a nice day o/