#Hey everybody πŸ‘‹ I'm making an old

1 messages Β· Page 1 of 1 (latest)

patent idol
charred jackal
#

It looks like you're always adding 1 to the z position of the dash end.

#

That's always going to be the same regardless of the rotation of the model.

#

Take a look at the docs for Transform.Forward

patent idol
#

ok cool, Thank you i'll take a look

#

I'm adding 1 to the _dashEnd to move along a grid in that direction

#

that seems to work for me, unless I'm misunderstanding your point

charred jackal
#

You're alway adding 1 to the Z component when pressing W

#

which means regardless of anything else that's going on, the object is always going to dash in the same direction.

patent idol
#

ooh yeah i get you now

#

πŸ’‘

charred jackal
#

I would be tempted to store the direction the character is facing, since you're probably going to need that elsewhere in your game. From that direction you can work out which axis you need to add or subtract from.

#

But if you just want to get this working right now, you could use

#

_dashEnd = _dashStart + Transform.forward;

patent idol
#

top tier support